美文网首页js css html
swift5.0 开启禁止右滑手势

swift5.0 开启禁止右滑手势

作者: 江河_ios | 来源:发表于2024-01-28 10:51 被阅读0次
    • 禁止右滑手势
        func popGestureClose() {
            if let ges = self.navigationController?.interactivePopGestureRecognizer?.view?.gestureRecognizers {
                for item in ges {
                    item.isEnabled = false
                }
            }
        }
    
    • 开启右滑手势
        func popGestureOpen() {
            if let ges = self.navigationController?.interactivePopGestureRecognizer?.view?.gestureRecognizers {
                for item in ges {
                    item.isEnabled = false
                }
            }
        }
    

    相关文章

      网友评论

        本文标题:swift5.0 开启禁止右滑手势

        本文链接:https://www.haomeiwen.com/subject/xxddodtx.html