I have a UIScrollView and a UIImageView which I have created programmatically without interface builder. How can I make sure both auto-rotate in horizontal orientation?
I have a UIScrollView and a UIImageView which I have created programmatically without interface
Share
If you’re subclassing UIViewController, even programmatically, you should get rotation for free. Just make sure you set the autoresizingMask on the scroll view and image view so that the mask is set to
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeightif you want the view to adapt to the new screen dimensions.