-2

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

Sina
  • 1
  • 2
    Looks like a dupe of https://stackoverflow.com/questions/60694506/disable-ios-reachability-swipe-gesture-in-ios-game although it doesn't necessarily look like there's a definitive answer. – jnpdx Feb 23 '22 at 03:33

1 Answers1

0

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]
}
Mohamed Emad Hegab
  • 2,665
  • 6
  • 39
  • 64