在Xcode11中,工程 targets里面的App Icons and Launch Images里面沒有了Launch Images Source選項,導致選擇不了添加的啟動頁。

可以這樣設置:
工程 targets->Build Settings搜索Launch,然后設置創建的啟動頁名字為LaunchImage,如下圖:
然后在Assets.xcassets里面創建LaunchImage,添加各個尺寸的圖。如下圖:
最后在模擬器中刪除APP,重新運行即可。
另外,我們可以在AppDelegate.m中加上[NSThread sleepForTimeInterval:2];
可以修改啟動頁的停留時間,2的單位為秒。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. [NSThread sleepForTimeInterval:2]; return YES; }
如果在真機調試時不顯示LaunchImage,則需要在LaunchScreen.storyboard上繪制圖片。