Changing the main view in Split View does not update the popover in the portrait

I have an application that uses a controller with a split view, and I install the controllers of the main and detailed views in the application’s split. However, depending on the user interaction (they relate to UIButton), I change the main view by accessing the viewcontrollers array of the shared view controller.

The problem is when I do this, and then change the orientation of the iPad to the portrait and access the main view through popover, it shows the previous main view, and not the new one that I installed. This is confusing because the landscape displays the correct main view (the new one that was installed). Not sure why the popover in the portrait is not updated to the new main view set in the viewcontrollers property in split mode.

Any ideas on how to fix this would be needed. Thanks.

+1
ios ipad uisplitviewcontroller
source share
1 answer

I managed to solve the problem. Just for the record, and in case someone else might have this problem in the future, the solution that I eventually found is to use the navigation controller for the main view controller, and then click and / or view the controllers as necessary ... and I no longer have a problem with popover in portrait orientation! Just be careful not to press the same controller twice, otherwise the application will fail - when it is done with the controller, place it.

+2
source share

All Articles