Commit 8ed70d3375d98a8bcb53ceabb769b889015f9991
1 parent
9b562ea2
认证页-偶尔不显示tabbar问题
Showing
4 changed files
with
34 additions
and
0 deletions
metaCode/Classes/Config/CNLiveConfigManager.swift
| ... | ... | @@ -91,4 +91,8 @@ extension Notification.Name { |
| 91 | 91 | //销毁播放器通知 |
| 92 | 92 | public static let kPlayerDestroyNotification = Notification.Name("kPlayerDestroyNotification") |
| 93 | 93 | } |
| 94 | + struct AuthVNumPageManage { | |
| 95 | + //认证页垂直方向是哪个页面的通知 1上面页 2中间页 3下面页 | |
| 96 | + public static let kAuthVNumPageChangedNotification = Notification.Name("kAuthVNumPageChangedNotification") | |
| 97 | + } | |
| 94 | 98 | } | ... | ... |
metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
| ... | ... | @@ -223,6 +223,9 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 223 | 223 | //我的身份排序后刷新 |
| 224 | 224 | NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthSortNotificationResult, object: nil) |
| 225 | 225 | |
| 226 | + //认证页垂直方向是哪个页面的通知 | |
| 227 | + NotificationCenter.default.addObserver(self, selector: #selector(kAuthVNumPageChangedNotificationAction), name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil) | |
| 228 | + | |
| 226 | 229 | // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight |
| 227 | 230 | |
| 228 | 231 | } |
| ... | ... | @@ -307,6 +310,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 307 | 310 | self.getApplyShopInfo() |
| 308 | 311 | print("DSShopDarenAuthResultNotificationAction") |
| 309 | 312 | } |
| 313 | + //刷新当前垂直是哪个页面 | |
| 314 | + @objc func kAuthVNumPageChangedNotificationAction(noti:Notification){ | |
| 315 | + let dict = (noti.userInfo ?? ["":""]) as! [String :Any] | |
| 316 | + let num = dict["AuthVNumPage"] as! Int | |
| 317 | + if num == 1{ | |
| 318 | + self.vNumPage = .VNumPageDown | |
| 319 | + }else if num == 2{ | |
| 320 | + self.vNumPage = .VNumPageMain | |
| 321 | + }else if num == 3{ | |
| 322 | + self.vNumPage = .VNumPageUp | |
| 323 | + } | |
| 324 | + } | |
| 310 | 325 | |
| 311 | 326 | |
| 312 | 327 | ... | ... |
metaCode/Classes/Main/HomePage/Controller/ShopDownDetail/CNLiveDownShopDetailController.swift
| ... | ... | @@ -26,6 +26,10 @@ class CNLiveDownShopDetailController:CNLiveBaseViewController, UICollectionViewD |
| 26 | 26 | let upSlideView = self.view.superview as! CNUpSlideView |
| 27 | 27 | let scrollView = upSlideView.superview as! UIScrollView |
| 28 | 28 | scrollView.setContentOffset(CGPoint(x: 0, y: scrollView.height), animated: true) |
| 29 | + | |
| 30 | + let result:Dictionary = ["AuthVNumPage":2] | |
| 31 | + NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result) | |
| 32 | + | |
| 29 | 33 | currentViewController()?.tabBarController?.tabBar.isHidden = false |
| 30 | 34 | |
| 31 | 35 | let metaVC = currentViewController() as! CNMetaCodeHomePageController |
| ... | ... | @@ -91,6 +95,9 @@ class CNLiveDownShopDetailController:CNLiveBaseViewController, UICollectionViewD |
| 91 | 95 | scrollView.setContentOffset(CGPoint(x: 0, y: scrollView.height), animated: true) |
| 92 | 96 | currentViewController()?.tabBarController?.tabBar.isHidden = false |
| 93 | 97 | |
| 98 | + let result:Dictionary = ["AuthVNumPage":2] | |
| 99 | + NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result) | |
| 100 | + | |
| 94 | 101 | let metaVC = currentViewController() as! CNMetaCodeHomePageController |
| 95 | 102 | let index = metaVC.pageFlowView.currentPageIndex |
| 96 | 103 | let customIndexView = metaVC.pageFlowView.viewWithTag(100+index) as! CNCustomIndexView | ... | ... |
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
| ... | ... | @@ -691,6 +691,10 @@ class CNFrontMainView : UIView{ |
| 691 | 691 | let customIndexView = ((self.superview as! CNMainView).superview as! UIScrollView).superview as! CNCustomIndexView |
| 692 | 692 | let baseScrollView = customIndexView.baseScrollView |
| 693 | 693 | baseScrollView.setContentOffset(CGPoint(x: 0, y: 0), animated: true) |
| 694 | + | |
| 695 | + let result:Dictionary = ["AuthVNumPage":1] | |
| 696 | + NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result) | |
| 697 | + | |
| 694 | 698 | currentViewController()?.tabBarController?.tabBar.isHidden = false |
| 695 | 699 | customIndexView.superScrollView?.isScrollEnabled = true |
| 696 | 700 | |
| ... | ... | @@ -704,6 +708,10 @@ class CNFrontMainView : UIView{ |
| 704 | 708 | let customIndexView = ((self.superview as! CNMainView).superview as! UIScrollView).superview as! CNCustomIndexView |
| 705 | 709 | let baseScrollView = customIndexView.baseScrollView |
| 706 | 710 | baseScrollView.setContentOffset(CGPoint(x: 0, y: (baseScrollView.height*2+KNavigationHeight)), animated: true) |
| 711 | + | |
| 712 | + let result:Dictionary = ["AuthVNumPage":3] | |
| 713 | + NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result) | |
| 714 | + | |
| 707 | 715 | currentViewController()?.tabBarController?.tabBar.isHidden = false |
| 708 | 716 | customIndexView.superScrollView?.isScrollEnabled = true |
| 709 | 717 | ... | ... |