在Xcode11中,工程 targets里面的App Icons and Launch Images里面没有了Launch Images Source选项,导致选择不了添加的启动页。
在Xcode11中添加launchImage

可以这样设置:

工程 targets->Build Settings搜索Launch,然后设置创建的启动页名字为LaunchImage,如下图:

在Xcode11中添加launchImage

然后在Assets.xcassets里面创建LaunchImage,添加各个尺寸的图。如下图:

在Xcode11中添加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上绘制图片。

相关文章:

  • 2022-12-23
  • 2022-01-30
  • 2021-12-10
  • 2022-01-19
  • 2021-06-30
  • 2021-11-19
  • 2021-07-24
  • 2021-09-18
猜你喜欢
  • 2022-12-23
  • 2021-12-21
  • 2021-12-05
  • 2021-07-27
  • 2021-07-18
  • 2022-02-07
  • 2021-05-26
相关资源
相似解决方案