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

rheb1026

macrumors member
Original poster
Hi all,

I'm fairly new to programming, but I've been working on an app that I need to set a background image and have it remain static when the iPhone is rotated.

What is the easiest way to go about doing this? I've tried adding an image view to the .xib and just assigning the image to that, but whenever the app rotates the image either shrinks or expands depending on the view "mode" chosen in the attributes inspector

Thanks for any help
 
Every view in UIKit has a property called autoResizingMask. If you don't want to stretch the image, set it's imageView's autoResizingMask to UIViewAutoresizingNone.
 
Thanks for the info; I had actually used this earlier in my program, but it completely slipped my mind to use it for that too. I appreciate the quick response
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.