Search code examples
iphoneiosuiviewcontrollerorientation-changes

is there a declarative approach to have one's background image changed from the portrait to landscape version upon orientation change in IOS?


Background - I have an iPhone/iPad app that has a background image in the main view. I'd like to introduce a specific portrait and landscape image for this background image, which is in a UIImageView subview.

Question - is there a declarative approach to have one's background image changed from the portrait to landscape version upon orientation change in IOS? For example through some file name convention approach?

(i.e. or do you have to manually change the image yourself each orientation change in the view controller's didRotateFromInterfaceOrientation)


Solution

  • I've never heard about such sweet opportunity. So I think you should manually reload images.