Instance Method

preferredScreenEdgesDeferringSystemGestures()

The screen edges for which you want your gestures to take precedence over the system gestures

Declaration

func preferredScreenEdgesDeferringSystemGestures() -> UIRectEdge

Discussion

Normally, the screen-edge gestures defined by the system take precedence over any gesture recognizers that you define. The system uses its gestures to implement system level behaviors, such as to display Control Center.

Whenever possible, you should allow the system gestures to take precedence. However, immersive apps can use this property to allow app-defined gestures to take precedence over the system gestures. You do that by overriding this property and returning the screen edges for which your gestures should take precedence.

If you change the edges preferred by your view controller, update the value of this property and call the setNeedsUpdateOfScreenEdgesDeferringSystemGestures() method to notify the system that the edges have changed.

See Also

Coordinating with System Gesture Recognizers

func childViewControllerForScreenEdgesDeferringSystemGestures()

Returns the child view controller that should be queried to see if its gestures should take precedence.

func setNeedsUpdateOfScreenEdgesDeferringSystemGestures()

Call this method when you change the screen edges that you use for deferring system gestures.