Question

I'm making an application for iPad in Xcode in template Master-detail application. I need to do a design for portrait mode and another for landscape mode. My first idea was make two UIViews and make a rule: if portrait, show View1, if landscape, show View2. But I have text fields in it and when the user will be typing something inside and then rotate the device, text will be deleted, because it will be another UIView... Can anybody help me, how to do it, please?

Was it helpful?

Solution

  1. You can have one view and use springs and struts or use autolayout.
  2. You can also add views and hide/show them based on the orientation change.
  3. You can change the size and position of the view on orientation change.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top