Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Hello kinthali As per the documentation </p> <p>Handling View Rotations</p> <blockquote> <p>By default, the UIViewController class displays views in portrait mode only. To support additional orientations, you must override the <strong>shouldAutorotateToInterfaceOrientation</strong>: method and return YES for any orientations your subclass supports. If the autoresizing properties of your views are configured correctly, that may be all you have to do. However, the UIViewController class provides additional hooks for you to implement additional behaviors as needed.</p> <p>To temporarily turn off features that are not needed or might otherwise cause problems during the orientation change, you can override the <strong>willRotateToInterfaceOrientation</strong>:duration: method and perform the needed actions there. You can then override the <strong>didRotateFromInterfaceOrientation</strong>: method and use it to reenable those features once the orientation change is complete.</p> </blockquote> <p>As per your question all you need to do is to return Yes for supported orientation in shouldAutorotateToInterfaceOrientation and you can call to a function to set the background image (Two different images for Portrait and landscape orientation)as follows</p> <pre><code>[self updateBackgroundImageForOrientation:PROBABLE_INTERFACE_ORIENTATION]; </code></pre> <p>In the method implementation you can update the background image.This way you can implement the desired behavior. Since you have not actually posted any functional code it is hard to point out the cause of the crash. You can debug and see the console logs for root cause of the crash.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload