zoukankan      html  css  js  c++  java
  • swift

    1.需要添加手势的界面 

      (1)addBackGesture()

      (2) 设置手势返回代理
    // MARK: - 添加返回手势
    extension JYRTSShopDetialConteoller:UIGestureRecognizerDelegate{
        func addBackGesture(){
            self.navigationController?.interactivePopGestureRecognizer?.delegate = self
            self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
        }
    }
    

      

    2.
    前提是 本界面导航控制器是隐藏的
    
    
    (1) 在home控制器设置 代理
    self.navigationController?.delegate = self
    
    (2)在代理方法隐藏 导航控制器
    
        func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
             if  viewController is JYRTSShopDetialConteoller{
                self.navigationController?.setNavigationBarHidden(true, animated: true)
            }
        }
    

      

  • 相关阅读:
    剑指Offer
    剑指Offer
    剑指Offer
    面积(area)
    最少步数
    细胞
    集合的前N个元素
    1~100卡特兰数(存一下hhhh)
    [Codeforces137C]History(排序,水题)
    [Codeforces676B]Pyramid of Glasses(递推,DP)
  • 原文地址:https://www.cnblogs.com/qingzZ/p/9916326.html
Copyright © 2011-2022 走看看