| | |
| | | |
| | | import UIKit |
| | | import SVProgressHUD |
| | | import JQTools |
| | | |
| | | class SceneDelegate: UIResponder, UIWindowSceneDelegate { |
| | | |
| | | var window: UIWindow? |
| | | |
| | | |
| | | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { |
| | | guard let windowScene = (scene as? UIWindowScene) else { return } |
| | | window = UIWindow(windowScene: windowScene) |
| | | window?.frame = windowScene.coordinateSpace.bounds |
| | | |
| | | // if UserViewModel.getToken() != nil{ |
| | | // app.registerAndLoginSuccess() |
| | | // }else{ |
| | | // let loginNav = LoginNav(rootViewController: LoginVC()) |
| | | // window?.rootViewController = loginNav |
| | | // window?.makeKeyAndVisible() |
| | | // } |
| | | |
| | | let tabbar = BaseTabBarVC() |
| | | window?.rootViewController = tabbar |
| | | window?.makeKeyAndVisible() |
| | | tabbar.selectedIndex = 0 |
| | | |
| | | |
| | | SVProgressHUD.setContainerView(window) |
| | | SVProgressHUD.setDefaultStyle(.dark) |
| | |
| | | } |
| | | |
| | | func needLogin(){ |
| | | |
| | | let loginNav = LoginNav(rootViewController: LoginVC()) |
| | | loginNav.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(loginNav, animated: true) |
| | | } |
| | | func loginSuccess(){ |
| | | |
| | | } |
| | | |
| | | func sceneDidDisconnect(_ scene: UIScene) { |