Today's own small works prepared to submit, on a start page, a variety of Baidu, all kinds of search, the result is good finally came out, and everyone to share, this process encountered a variety of small problems. (Note that the Xcode version is 7.2)
1. The start page is generally a picture, because Apple has 4,4s,5,5s,6,6s may have other models later, so to consider the adaptation of the screen, there is a system adaptation (some users of the system version does not support some technology, For example Launchscreen.storyboard), that is, the size of the picture, so much of the picture, the size of the picture can be found in Xcode (at that time, all kinds of Baidu, a variety of search, the answer is also divergent opinions, so read this article does not have to search, suggest novice must see, May take a lot less detours)
Xcode has Launchscreen.storyboard or launchscreen.xib, the evaluation by default is to take this when the startup page, this is a static page, can not write code, that is, only with automatic layout to fit the size of the screen, I just started to take this to do the start page, just a picture Film Center display, later found that this compatibility is not strong, this technology is not available, there is another way online, this method a lot of people are in use, I also looked at a long time to understand, direct:
Find Assets.xcassets in the project Click to appear:
29pt is 29 pixels meaning 2x is 29*2, and so on, there is the name of the image is generally the beginning of the letter with the size of the pixel plus a few pixels, this is very important, it is said that the Apple system will automatically recognize several times the resolution, like this: [email protected], (then the picture of the pixel, can also be called size easy to understand, for 29*2) [email protected], (image of the pixel is 40*3)
Just click on the + sign
will have the following interface (note that the Xcode version is 7.2, different versions of the interface may not be the same)
And this will appear on top of it:
The key problem came, the size of the picture, I was tangled in the problem of the Internet search a lot of many, very messy, the ultimate Kung Fu, pale no place, marvelous. The size of the graph can be found in Xcode,
Select that empty border, on the right side will have this border to use how big picture, several times of the picture, there is then the name of the picture is the best and the above, such as: [email protected], personal feeling such a better name.
After the picture is finished, the next step is to modify something such as:
Launchscreen.xib or Launchscreen.storyboard, find use as Launchscreen on the right and cancel the tick.
Then look at the picture:
Empty the contents of 6, click 5, will come out a box, inside the content and *.xcassets (green icon) the same
That's what happens after that:
Continue to point 5,
Just like this:
Remember to empty 6 of the content, and finally, like this:
Finally there is the simulator on the previous version is deleted, and then run on it (I did not delete the first, always unsuccessful, deleted after the good).
ios-App launch page settings (Novice must see!) )