[英]Black screen shown after splash screen - iOS
我有一個故事板文件,我想將其用作啟動畫面。 我已將該故事板中的 ViewController 設置為初始的。
我還像這樣設置了啟動屏幕:
這是我在SceneDelegate
中選擇第一個 ViewController 以顯示用戶的代碼:
self.window = UIWindow(frame: UIScreen.main.bounds)
let vc = storyboard.instantiateViewController (withIdentifier: "Channels") as! UINavigationController
window = UIWindow(windowScene: windowScene)
window?.rootViewController = vc
window?.makeKeyAndVisible()
我在第一次啟動應用程序時看到閃屏,然后是黑屏; 最后是我的用戶界面。
檢查是否為故事板中的 ViewController 選擇了“is Initial Viewcontroller”。 看這個截圖
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.