Integrate CYLTabBar center scan button and unify UIKit navigation.
Add CYLTabBarController with a global scan entry, promote MainTabBarController to the window root after login, replace RouterPath-based navigation with AppNavigator, and fix Profile diffable cell reconfiguration crashes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -7,11 +7,14 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
/// 窗口 Scene 代理,负责创建根窗口并挂载 `RootViewController`。
|
||||
/// 窗口 Scene 代理,负责创建根窗口并挂载会话协调器。
|
||||
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
/// 持有会话协调器,确保登录后切换 window 根控制器时仍能响应登出等阶段变化。
|
||||
private var sessionRootController: RootViewController?
|
||||
|
||||
/// Scene 连接时初始化窗口、重置 UI 测试状态并展示根控制器。
|
||||
func scene(
|
||||
_ scene: UIScene,
|
||||
@ -22,8 +25,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
|
||||
AppUITestLaunchState.resetIfNeeded()
|
||||
|
||||
let rootViewController = RootViewController()
|
||||
sessionRootController = rootViewController
|
||||
|
||||
let window = UIWindow(windowScene: windowScene)
|
||||
window.rootViewController = RootViewController()
|
||||
window.rootViewController = rootViewController
|
||||
window.makeKeyAndVisible()
|
||||
self.window = window
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user