iOS右滑手势返回

一、指定的控制器返回

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右滑手势返回)