Commit b674700e authored by Steven杜宇's avatar Steven杜宇

// AI

parent 7d587a93
...@@ -148,9 +148,9 @@ func goTabBarBy(tabType : tabBarPageType) { ...@@ -148,9 +148,9 @@ func goTabBarBy(tabType : tabBarPageType) {
case .service: case .service:
tabIndex = 1 tabIndex = 1
case .community: case .community:
tabIndex = 2
case .mine:
tabIndex = 3 tabIndex = 3
case .mine:
tabIndex = 4
} }
if let vc = UIApplication.shared.keyWindow?.rootViewController as? YHTabBarViewController { if let vc = UIApplication.shared.keyWindow?.rootViewController as? YHTabBarViewController {
...@@ -176,16 +176,17 @@ func configTabBarController() -> YHTabBarViewController { ...@@ -176,16 +176,17 @@ func configTabBarController() -> YHTabBarViewController {
let v4 = YHNavigationController(rootVC:YHMyViewController()) let v4 = YHNavigationController(rootVC:YHMyViewController())
// 截获AI tabbarItem 点击事件 // 截获AI tabbarItem 点击事件
let ai_tabIndex = 2
tabBarController.shouldHijackHandler = { tabBarController.shouldHijackHandler = {
tabBarController, viewController, index in tabBarController, viewController, index in
if index == 2 { if index == ai_tabIndex {
return true return true
} }
return false return false
} }
tabBarController.didHijackHandler = { tabBarController.didHijackHandler = {
tabBarController, viewController, index in tabBarController, viewController, index in
if index == 2 { if index == ai_tabIndex {
let vc = YHAITabViewController() let vc = YHAITabViewController()
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment