Commit a4f6f9adb311747050c1c668e8bfb83e94eae3de
1 parent
676b613a
基类 NaigationController注释一段代码 , 影响push动画
Showing
6 changed files
with
25 additions
and
20 deletions
metaCode/Classes/Common/Base/CNLiveBaseNavigationController.swift
| ... | ... | @@ -11,13 +11,15 @@ class CNLiveBaseNavigationController : UINavigationController,UINavigationContro |
| 11 | 11 | |
| 12 | 12 | override func viewDidLoad() { |
| 13 | 13 | super.viewDidLoad() |
| 14 | - guard let targets = interactivePopGestureRecognizer?.value(forKey: "_targets") as? [NSObject] else {return} | |
| 15 | - let targetObjc = targets[0] | |
| 16 | - let target = targetObjc.value(forKey: "target") | |
| 17 | - let action = Selector(("handleNavigationTransition:")) | |
| 18 | 14 | |
| 19 | - let panges = UIPanGestureRecognizer(target: target, action: action) | |
| 20 | - view.addGestureRecognizer(panges) | |
| 15 | + //下面注释的代码会影响push ,暂时注释 | |
| 16 | +// guard let targets = interactivePopGestureRecognizer?.value(forKey: "_targets") as? [NSObject] else {return} | |
| 17 | +// let targetObjc = targets[0] | |
| 18 | +// let target = targetObjc.value(forKey: "target") | |
| 19 | +// let action = Selector(("handleNavigationTransition:")) | |
| 20 | +// | |
| 21 | +// let panges = UIPanGestureRecognizer(target: target, action: action) | |
| 22 | +// view.addGestureRecognizer(panges) | |
| 21 | 23 | |
| 22 | 24 | self.interactivePopGestureRecognizer?.delegate = self //侧滑返回 |
| 23 | 25 | self.delegate = self as UINavigationControllerDelegate |
| ... | ... | @@ -45,12 +47,15 @@ class CNLiveBaseNavigationController : UINavigationController,UINavigationContro |
| 45 | 47 | |
| 46 | 48 | /// 重写push方法的目的 : 拦截所有push进来的子控制器 |
| 47 | 49 | override func pushViewController(_ viewController: UIViewController, animated: Bool) { |
| 48 | - if (self.children.count > 0 ) { | |
| 49 | - // 隐藏底部的工具条 | |
| 50 | - viewController.hidesBottomBarWhenPushed = true | |
| 50 | + DispatchQueue.main.async { | |
| 51 | + | |
| 52 | + if (self.children.count > 0 ) { | |
| 53 | + // 隐藏底部的工具条 | |
| 54 | + viewController.hidesBottomBarWhenPushed = true | |
| 55 | + } | |
| 56 | + // 所有设置搞定后, 再push控制器 | |
| 57 | + super.pushViewController(viewController, animated: animated) | |
| 51 | 58 | } |
| 52 | - // 所有设置搞定后, 再push控制器 | |
| 53 | - super.pushViewController(viewController, animated: animated) | |
| 54 | 59 | } |
| 55 | 60 | |
| 56 | 61 | @objc func ClickBackBtn() { | ... | ... |
metaCode/Classes/Common/Base/CNLiveBaseTabBarViewController.swift
| ... | ... | @@ -65,7 +65,7 @@ class CNLiveBaseTabBarViewController: UITabBarController |
| 65 | 65 | creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页") |
| 66 | 66 | |
| 67 | 67 | creatTabbarView(viewController: authVC, image: "tabbar_authentication_unSelect", selectImage: "tabbar_authentication", title: "认证") |
| 68 | - | |
| 68 | + | |
| 69 | 69 | creatTabbarView(viewController: mineVC, image: "tabbar_mine_icon_default", selectImage: "tabbar_mine_icon_selected", title: "我的") |
| 70 | 70 | |
| 71 | 71 | self.tabBar.tintColor = UIColor("#0066FE") |
| ... | ... | @@ -73,8 +73,7 @@ class CNLiveBaseTabBarViewController: UITabBarController |
| 73 | 73 | |
| 74 | 74 | self.viewControllers = [ |
| 75 | 75 | CNLiveBaseNavigationController(rootViewController: homeVC),CNLiveBaseNavigationController(rootViewController: authVC), |
| 76 | - CNLiveBaseNavigationController(rootViewController: mineVC), | |
| 77 | - ]; | |
| 76 | + CNLiveBaseNavigationController(rootViewController: mineVC)] | |
| 78 | 77 | } |
| 79 | 78 | |
| 80 | 79 | // MARK: - Tabar 背景图 | ... | ... |
metaCode/Classes/Config/CNLiveConfigstant.swift
metaCode/Classes/Main/HomePage/Controller/ShopUpConsole/CNLiveShopConsoleController.swift
| ... | ... | @@ -102,6 +102,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel |
| 102 | 102 | }else if itemModel.type == CNLiveShopConsoleType.GLYHQ.rawValue{ |
| 103 | 103 | //优惠券管理 |
| 104 | 104 | let vc = CNLiveShopCouponsManagerViewController() |
| 105 | + | |
| 105 | 106 | navigationViewController().pushViewController(vc, animated: pushAnimated) |
| 106 | 107 | // currentViewController()?.navigationController?.pushViewController(vc, animated: pushAnimated) |
| 107 | 108 | }else if itemModel.type == CNLiveShopConsoleType.CreateShopClassify.rawValue{ | ... | ... |
metaCode/Classes/Main/HomePage/View/VerticalViews/CNCustomIndexView.swift
| ... | ... | @@ -97,7 +97,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 97 | 97 | |
| 98 | 98 | willSet |
| 99 | 99 | { |
| 100 | - print("Will set an new value \(String(describing: newValue)) to age") | |
| 100 | +// print("Will set an new value \(String(describing: newValue)) to age") | |
| 101 | 101 | } |
| 102 | 102 | //我们需要在age属性发生变化后,更新一下nickName这个属性 |
| 103 | 103 | didSet |
| ... | ... | @@ -277,7 +277,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 277 | 277 | // MARK: - 设置颜色值跟随ScrollView滑动变化 |
| 278 | 278 | func addColorManager() |
| 279 | 279 | { |
| 280 | - print(self.colorDataArr) | |
| 280 | +// print(self.colorDataArr) | |
| 281 | 281 | let colorChange:WJColorChange = WJColorChange.init(type:SingleColor) |
| 282 | 282 | colorChange.delegate = self |
| 283 | 283 | colorChange.offset = 100 | ... | ... |
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideView.swift
| ... | ... | @@ -22,7 +22,7 @@ class CNDownSlideView:UIView{ |
| 22 | 22 | |
| 23 | 23 | let contentView = UIView.init(frame: CGRect(x: 0, y: 0, width: self.width, height: self.height)) |
| 24 | 24 | contentView.backgroundColor = UIColor.clear |
| 25 | - | |
| 25 | + contentView.isUserInteractionEnabled = true | |
| 26 | 26 | // let path:UIBezierPath = UIBezierPath.init(roundedRect: contentView.bounds, byRoundingCorners: [.bottomLeft, .bottomRight], cornerRadii: CGSize.init(width: 20, height: 20)) |
| 27 | 27 | // |
| 28 | 28 | // let maskLayer:CAShapeLayer = CAShapeLayer() |
| ... | ... | @@ -48,14 +48,14 @@ class CNDownSlideView:UIView{ |
| 48 | 48 | return webView |
| 49 | 49 | }() |
| 50 | 50 | |
| 51 | - var upSlideVC:CNUpSlideViewController = { | |
| 51 | + lazy var upSlideVC:CNUpSlideViewController = { | |
| 52 | 52 | let upSlideVC = CNUpSlideViewController.init() |
| 53 | 53 | upSlideVC.view.width = KSreenWidth |
| 54 | 54 | upSlideVC.view.height = KSreenHeight-DownSlideBottomViewHeight |
| 55 | 55 | return upSlideVC |
| 56 | 56 | }() |
| 57 | 57 | |
| 58 | - var shopConsoleVC:CNLiveShopConsoleController = { | |
| 58 | + lazy var shopConsoleVC:CNLiveShopConsoleController = { | |
| 59 | 59 | let shopConsoleVC = CNLiveShopConsoleController.init() |
| 60 | 60 | shopConsoleVC.view.width = KSreenWidth |
| 61 | 61 | shopConsoleVC.view.height = KSreenHeight-DownSlideBottomViewHeight | ... | ... |