Question

How to perform auto resizing a UIView without device orientation? On current device orientation I want to set UIView to be autoresized when it get presented on screen of iPhone.

Was it helpful?

Solution

The best strategy will be using new auto layout feature from iOS 6 and greater and its more optimized for Xcode 5.

You don't have to make separate views in autolayout for portrait or landscape mode unless there is specific requirement for you UI. Your basic views will look same for landscape and portrait both.

For getting started with Autolayout you can check this tutorial you will get to learn all the basics in this. http://www.raywenderlich.com/50317/beginning-auto-layout-tutorial-in-ios-7-part-1

Hope this helps. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top