ios - iPhone orientation management : what is the most efficient way to do? -


I need to develop an iPad app, which should manage two orientation modes (Landscape and Portrait). According to, there are 2 ways to move forward.

- A visual element is first adjusted when the rotation event is received. The main advantage is that we had only one view controller - secondly, it was in displaying a specific view controller for each orientation. Therefore, we have 2 view controllers.

The second approach looks good, but I'am is afraid of the number of ViewController which will be required. What is more, the "Data Synchronization Logic" in View Controllers has to be dubbed (or separated from the View Controller) for use in both the orientation.

There are several "full custom elements" and many view controllers I need to develop the application.

If someone has advice or experience feedback, then it will be really appreciated;)

Thanks for reading!

The second approach should be: Using 2 different views (one for the picture, for the scenario) and willRotateToInterfaceOrientation view Swap the view of the controller: . There is no need to duplicate your data logic.

What kind of use is that? I would say: it depends

  • If lensescape and portrait mode are different than the views of the situation / size only, then I use the first one (and you get good animations of frame changes
  • If the landscape and picture are very different, then I like the other.

Comments