Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hodgey87

Guest
Original poster
Mar 20, 2009
41
0
Hi guys,

Just a quick one, is there a way you can re size a background image on the ipad. The image fits fine in landscape mode but if you turn it to portrait theres a little gap at the top. Ive searched and cant really find anything relevant to what im after.

Cheers
 
If the image is in an image view just set the frame of the imageview, or let be set automatically with the autoresizeMask. The imageview will scale the image to fit. If your image becomes too distorted you'll have to make an adjustment of some kind but the imageview will automatically scale its contents for you. You might want to make the image 1024 by 1024 and not let it scale. The contentMode controls how the scaling is done.
 
If the image is in an image view just set the frame of the imageview, or let be set automatically with the autoresizeMask. The imageview will scale the image to fit. If your image becomes too distorted you'll have to make an adjustment of some kind but the imageview will automatically scale its contents for you. You might want to make the image 1024 by 1024 and not let it scale. The contentMode controls how the scaling is done.

The image is already 1024 x 1024, its just on that portrait view the image is slight off. Ive tried setting the framesize and the autoresize mask but cant get it working.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.