更新于2019.05.07
1.延遲啟動(dòng)頁加載,避免出現(xiàn)一瞬間的白屏或者黑屏(在AppDelegate方法中調(diào)用)
#pragma mark 啟動(dòng)圖片
-(void)JK_launchPhotos{
// 啟動(dòng)圖片延時(shí): 2秒 避免網(wǎng)絡(luò)判斷有個(gè)黑屏?xí)r間
NSTimer *connectionTimer = [NSTimer scheduledTimerWithTimeInterval:2.0f target:self selector:@selector(timerFired:) userInfo:nil repeats:NO];
[[NSRunLoop currentRunLoop] addTimer:connectionTimer forMode:NSDefaultRunLoopMode];
do{
[[NSRunLoop currentRunLoop]runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0]];
}while (!done);
}
BOOL done;
- (void)timerFired:(NSTimer *)timer {
done = YES;
}
2.所有設(shè)置正常,啟動(dòng)頁圖片無法加載
直接拖拽圖片到項(xiàng)目根目錄即可

image.png
更新于2016.04.06
之前有說過關(guān)于App啟動(dòng)頁的設(shè)計(jì)圖,這里主要提及下設(shè)置方式和可能碰到的一些問題
第一種方式:
1.新建項(xiàng)目,可以看到LaunchScreen.storyboard
2.手動(dòng)設(shè)置啟動(dòng)圖,上下左右進(jìn)行約束圖片
3.運(yùn)行模擬器,查看效果是否成功

Paste_Image.png

Paste_Image.png

Paste_Image.png
第二種方式:
1.在Asset.xcassets添加啟動(dòng)頁面文件夾
2.iPhone和iPad,看情況需要,如果只要手機(jī)端,那么平板端的圖片可以不用,提供的圖片越齊全越好(以下尺寸僅供參考)
3.修改啟動(dòng)頁默認(rèn)路徑,基本上就可以了

Paste_Image.png

Paste_Image.png

Paste_Image.png

Paste_Image.png

Paste_Image.png

Paste_Image.png
如需了解啟動(dòng)Logo設(shè)置,請(qǐng)移步:
http://www.itdecent.cn/p/2a04e278133a