"IOS" splash screen

Source: Internet
Author: User

General statement:

Two ways, one is to use the system comes with, according to the rules to define the name of the boot image, display for 1 seconds, to extend the time, with [Nsthread? SLEEPFORTIMEINTERVAL:5.0], the other is the custom uiivew, added to the window.


Xiang Statement:

1, prepare the picture resources, put into the project, you can, the default time is 1s

iOS devices now have three different resolutions: iphone 320x480, iphone 4 640x960, IPad 768x1024. Previous program Start screen (picture) Just prepare a default.png, but now it's getting a lot more complicated. Here is a summary of what Cocoachina members have done

If a program supports both the iphone and ipad, it needs to include the following images:

default-portrait.png ipad Dedicated vertical splash screen 768x1024 or 768x1004

Default-landscape.png ipad-specific landscape Start screen 1024x768 or 1024x748

default-portraitupsidedown.png ipad Dedicated Vertical splash screen (home button on screen), can omit 768x1024 or 768x1004

Default-landscapeleft.png ipad-specific landscape Start screen, can omit 1024x768 or 1024x748

Default-landscaperight.png ipad-specific landscape Start screen, can omit 1024x768 or 1024x748

default.png iphone Default boot image, if you do not provide the above several ipad dedicated boot pictures, then run on the ipad also use Default.png (not recommended) 320x480 or 320x460

[Email protected] iPhone4 start picture 640x960 or 640x920

?

In order to use the above splash screen on ipad, you also need to add key:uisupportedinterfaceorientations to the info.plist. At the same time, add value uiinterfaceorientationportrait, Uiinterfacorientationportraitupsidedown, Uiinterfaceorientationlandscapeleft, Uiinterfaceorientationlandscaperight.


2, if you want to set the Start screen display time,

In XXXAPPDELEGATE.M-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (NSDictionary*) Insert the following line of code into the Launchoptions method:


Insert delay of 5 seconds befor the splash screen disappers.


[Nsthread sleepfortimeinterval:5.0]; In fact, this line of code can also not add, because by default, the Welcome interface time only one second, plus this sentence is to extend


Welcome to the screen display time to 5 seconds, the time you can define their own.


3, in XXXAPPDELEGATE.M-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (NSDictionary* ) launchoptions to customize the splash screen by using controls such as UIView or Uiimageview

I asked for an icon to use the image they provided when I was picking up the SDK for the Apple Helper. And then make a set of naming rules. A black screen does not appear on the splash screen

When you change it, it shows.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.