Search code examples
uisplitviewcontrolleripaduisplitview

How to make UIsplitview's popover visible in portrait mode iPad


I would like to make popover view visible whenever user switches from landscape view to portrait view in UIsplitView of iPad. Although user can make it visible by clicking on bar button but I want this to be automated for portrait mode.


Solution

  • Inside " -(BOOL) shouldAutorotateToInterfaceOrientation" method, check for the device orientation.If it is portrait, then Present the popover as you do for making it visible when user clicks bar button.

    All the best.