Search code examples
iosipadcocoa-touchuisplitviewcontroller

how to show master view of UISplitViewController with popover style?


the default style to show master view in portrait mode is to slide in the master view , but I want to show master view with pop over style, is there any way to do it ?


Solution

  • From this post, thanks @AppleDeveloper:

    This has been the default action since 5.1. From the iOS 6 release notes:

    In iOS 5.1, the UISplitViewController class adopts the sliding presentation style when presenting the left view (previously seen only in Mail). This style is used when presentation is initiated either by the existing bar button item provided by the delegate methods or by a swipe gesture within the right view. No additional API adoption is required to obtain this behavior, and all existing APIs—including that of the UIPopoverController instance provided by the delegate—will continue to work as before.

    If the gesture would be insupportable in your app, setting the presentsWithGesture property of your split view controller to NO disables the gesture. However, disabling the gesture is discouraged because its use preserves a consistent user experience across all apps.

    There's a dirty way to fix this.