美文网首页
iOS右滑手势返回

iOS右滑手势返回

作者: CaptainJK | 来源:发表于2016-08-07 20:00 被阅读0次

    一、指定的控制器返回

    class LLBaseNavigationController: UINavigationController,UIGestureRecognizerDelegate {
       
        override func viewDidLoad() {
            super.viewDidLoad()
            self.interactivePopGestureRecognizer?.delegate = self
        }
        
        //Slip right to pop.
        func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -> Bool
        {
             /*制定需要右滑手势返回的ViewController*/
            if (self.topViewController is OtherEquipmentsSetControl)||(self.topViewController is EquipmentsSetControl)
            {
                return true
            }
            else
            {
                return false
            }
        }
    }
    

    相关文章

      网友评论

          本文标题:iOS右滑手势返回

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