Search code examples
iphoneipadbackground-imagelandscapeportrait

Question about using landscape mode with custom images on the iPhone/iPad


Hey I just had a simple question about implementing landscape mode for an app, particularly running on the iPad (but I am sure the concept holds true for the iPhone). I have a custom background image that I am wanting to use for my root view. I designed the image so that it fits the iPad screen size for portrait mode. Do I need to design a second image for landscape mode so that it fits correctly? Is that how the landscape/portrait transition works, switching between two different images? I really don't have any idea, so any help would be appreciated. Thanks!


Solution

  • Assuming you have a UIImageView as your backdrop, change its image property after the device orientation changes.

    See Handling View Rotations in http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html