在 UIKit iOS 13 更改之前,如何在 SceneDelegate 设置 rootViewController?
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
@available(iOS 13.0, *)
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let _ = (scene as? UIWindowScene) else { return }
}
Run Code Online (Sandbox Code Playgroud)