Implementing a splash screen in iOS

前端 未结 10 867
粉色の甜心
粉色の甜心 2020-12-01 01:13

I\'m quite a newbie in Cocoa, Objective-C and iOS development.

I\'d like to implement a View that is just a splash screen and only last for a short time before routi

相关标签:
10条回答
  • 2020-12-01 02:02

    You only have to add three images for iPhone, iPhone 5 and iPad named Default.png, Default-568h@2x.png and Default@2x.png. Now the clarity of the images depends on the size you are taking. You should take the standard sizes.

    0 讨论(0)
  • 2020-12-01 02:03

    Having just had to fix this same problem myself, I thought I'd post an update.

    I found that I had to set the Supported Interface Orientations in the Info.plist before it would work correctly.

    I also found this article on iOSDeveloperTips.com to be pretty useful: Managing Multiple Launch Images

    0 讨论(0)
  • 2020-12-01 02:04

    See App Launch (Default) Images under the iOS Application Programming Guide.

    It should also be noted Apple advised NOT abusing the launch image as a splash screen. Apple HIG

    0 讨论(0)
  • 2020-12-01 02:09

    To add splash screen just simply replace all the default images (likedefault@2x.png,....) with your splash image with the same default name (for all hardware display type) . To increase the duration of your splash screen , in appDelegate method

    didFinishLaunchingWithOptions 
    

    just sleep the main thread for the duration you want as:

    [NSThread SleepForTimeInterval:(Your time interval)];
    

    you can also use sleep(time interval) in

    didFinishLaunchingWithOptions
    
    sleep(3);
    
    0 讨论(0)
提交回复
热议问题