Search code examples
ipadios6uiinterfaceorientation

Device Orientation in IOS 6 portrait to landscape


I want to rotate application in landscape and Portrait mode. I have one view controller. Once i rotate my device to landscape mode. portrait image and overlap landscape image.How can i achieve this please help me out with example. Thanks in Advance.


Solution

  • I think this is because of the autoResizingMask.

    Give your UIImageView autoResizingMask as

    myImage.autoresizingMask =  UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin;