ios - View presented from master panel of UISplitViewController not rotating when rotated from portrait to landscape (iPad) -


i presenting modal view , action sheet master panel of uisplitviewcontroller. ios 9.3

1) if present view when ipad in portrait mode , rotate ipad landscape, screen not rotating.enter image description here
2) if present view when ipad in landscape mode , rotate ipad portrait, screen rotating.

how can achieve rotation?

there 2 solutions resolve issue:

  1. it not ideal present modal views master panel should doing uisplitviewcontroller itself.

    splitviewcontroller.preferreddisplaymode =uisplitviewcontrollerdisplaymodeallvisible; // displaying master panel in screen shot in question modalviewcontroller.modalpresentationstyle = uimodalpresentationformsheet; // displaying modalviewcontroller in form sheet style [splitviewcontroller presentviewcontroller:modalviewcontroller animated:true completion:nil]; // note: modalviewcontroller presented uisplitviewcontroller , not master panel of split view 
  2. the master panel of spilt view presented in popover when in portrait mode device rotation changes have go through popovercontroller. guessing chain breaks @ points. so, resolve issue call

    [splivc setpreferreddisplaymode:uisplitviewcontrollerdisplaymodeprimaryhidden];   

before modal presentation segue called(from prepareforsegue). not sure of whether delegates working approach.

edit: have observed if split view in uisplitviewcontrollerdisplaymodeallvisible mode presenting modal vc master panel(lets simple modal segue in storyboard) not give rotation issue. have confirmed in ios 9.3 simulator.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -