分为两步:
第一步:在AppDelegate.m中的方法
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions中添加代码:
[[UIApplication sharedApplication] setStatusBarHidden:NO];//将状态栏隐藏
[NSThread sleepForTimeInterval:2];//设置启动页的停留时间
第二步:将要作为启动页的图片拖入工程,命名为Default.png
第三步:在 工程名-info.plist文件中,Information Property List 中添加 Status bar is initially hidden,将其值设为YES,输入前几个字母,系统会自动感知出来。