let screnDelegate: UIWindowSceneDelegate? = {
var uiScreen: UIScene?
UIApplication.shared.connectedScenes.forEach { (screen) in
uiScreen = screen
}
return (uiScreen?.delegate as? UIWindowSceneDelegate)
}()
screnDelegate?.window!?.rootViewController = UIHostingController(rootView: 页面View());
网友评论