Search code examples
xcodeipadmaster-detail

Avoide swipe right and swipe left into pushed Segue


I have a standard MasterDetailApplication for iPad. From the DetailViewcontroller (if the iPad is in Portrait mode) the Segue "Image View" will be pushed. "Image View" has the size: iPad Full Screen. With the swipe right or left, the MasterView will appear on the left side of "Image View". How can I avoid this?

Allpication will return to the Master-Detail View if the iPad is in Landscape mode.

Thanks!


Solution

  • In UISplitViewController there is a property to Specify whether the hidden view can be presented and dismissed via a swipe gesture.

    The property name is presentsWithGesture

       self.splitViewController.presentsWithGesture=NO;
    

    Setting this property NO will disable gesture recognizer