| | |
| | | |
| | | extension AppDelegate{ |
| | | func registerAndLoginSuccess(){ |
| | | let snapView = screnDelegate?.window?.snapshotView(afterScreenUpdates: true) |
| | | let snapView = sceneDelegate?.window?.snapshotView(afterScreenUpdates: true) |
| | | |
| | | let tabBar = BaseTabBarVC() |
| | | let homeNav = BaseNav(rootViewController: HomeVC()) |
| | |
| | | let searchVCNav = BaseNav(rootViewController: SearchVC()) |
| | | searchVCNav.tabBarItem = UITabBarItem(title: "搜索玩湃", image: UIImage(named: "tabbar_search"), selectedImage: UIImage(named: "tabbar_search_s")!.withRenderingMode(.alwaysOriginal)) |
| | | tabBar.viewControllers = [homeNav,clouseNav,welfareVCNav,searchVCNav] |
| | | screnDelegate?.window?.rootViewController = tabBar |
| | | screnDelegate?.window?.rootViewController?.view.addSubview(snapView!) |
| | | screnDelegate?.window?.makeKeyAndVisible() |
| | | sceneDelegate?.window?.rootViewController = tabBar |
| | | sceneDelegate?.window?.rootViewController?.view.addSubview(snapView!) |
| | | sceneDelegate?.window?.makeKeyAndVisible() |
| | | |
| | | UIView.animate(withDuration: 1.5) { |
| | | snapView?.alpha = 0 |
| | |
| | | |
| | | func needLogin(){ |
| | | UserViewModel.clearToken() |
| | | let loginVC = LoginVC() |
| | | loginVC.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(loginVC, animated: true) |
| | | let loginNav = LoginNav(rootViewController: LoginVC()) |
| | | loginNav.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(loginNav, animated: true) |
| | | } |
| | | } |
| | | |