Disable swipe back gesture in Swift

后端 未结 10 1492
轻奢々
轻奢々 2020-12-02 09:47

Been looking around on here for a while but can\'t seem to find a working solution.

I\'m trying to disable the swipe to go back to previous view gesture, in Swift.

10条回答
  •  猫巷女王i
    2020-12-02 10:25

    If requirement is to show side menu on some of the screens then add AddScreenEdgePanGesture on this specific view instead of navigationController view

    replace it

    SideMenuManager.default.menuAddScreenEdgePanGesturesToPresent(toView: self.navigationController?.view)
    

    with this

    SideMenuManager.default.menuAddScreenEdgePanGesturesToPresent(toView: self.view)
    

提交回复
热议问题