3
votes

I have 2 UIViews. The first supports only portrait. The second both portrait and landscape. To achieve that i change the return value of supportedInterfaceOrientations so that it gives the right orientations depending on what view i am.

When i change from screen 2 to screen 1 the view remains in a buggy landscape form, however when i rotate the device the View actually rotates to portrait and is locked there correctly. The reason for that is that when i rotate the device a rotation change event will be triggered.

my question: Is there a way to programmatically trigger a orientation change event?

1

1 Answers

1
votes

I believe what you're looking for is preferredInterfaceOrientationForPresentation on view 1:

 - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
 {
     return UIInterfaceOrientationPortrait;
 }