步骤1:
Main.storyboard 相当于rootVC
LaunchScreen.storyboard 启动图片
删除默认ViewController,General—>Main Interface和General—>Launch Screen File里的默认文字按Enter键
步骤2:
在AppDelegate.m文件里添加:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window makeKeyAndVisible];
出现上下黑边别急:进行步骤3就好了;
步骤3:
在Assets.xcassets里添加new LaunchImage; 在new LaunchImage里添加6张尺寸:
iPhone Portrait iOS 8,9
Retina HD 5.5 1242 * 2208
Retina HD 4.7 750 * 1334
iPhone Portrait iOS 7-9
2x 640 * 960
Retina 4 640 * 1136
iPhoneX Portrait
1125px × 2436px (375pt × 812pt @3x)
iPhoneX Landscape
2436px × 1125px (812pt × 375pt @3x)
选择进入General—>Launch images Sourc 选择LaunchImage就行了;
状态栏
1.设置启动页时,去掉时间状态栏:
在info.plist文件添加St