'How to Disable iOS Swipe Down Reachability Programitctly in Swift

I'm trying to build a game app with Swift that should disable swipe down ios reachability in a specific view controller how can I do that?

image



Solution 1:[1]

To be able to do this, you may need to override preferredScreenEdgesDeferringSystemGestures to tell it the edge of the screen you want to prevent accepting gestures

so you can try:

override func preferredScreenEdgesDeferringSystemGestures() -> UIRectEdge {
    return [.bottom]
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mohamed Emad Hegab