Xcode6 compiled on Iphone5+ios7 simulator with black edge problem solution

Source: Internet
Author: User

Problem Description:

In the XCODE6 environment, the IPhone5 or IPhone5S simulator, running under IOS7 or iOS7.1, has black edges on the screen. There is no problem under the iOS8.

Problem Analysis:

This familiar scene again, the last encounter this situation can be traced back to two years ago, IPhone5 just came out of that period of time, on the 3.5inch screen of the program if not add 568h default.png, on the 4inch screen run will appear this up and down "white" condition.

And now it is time for IPhone6 and Iphone6plus, and this scene has come again.

In fact, it can be found that not only up and down the problem of white, in this state launch screen actually did not load.

The reason is conceivable.

Xcode6 on the basis of XCODE5, some adjustments made, in fact, is not backward-compatible. XCODE5 on the start page through images Asset management, and to the Xcode6, Apple introduced a new start-page mechanism: launchscreen.xib, and this mechanism is precisely non-compatible. Xcode6 has automatically forced the use of the ios8+ system for IPhone6 above the simulator, iphone 6 (7.1) This simulator does not exist (at least I did not find), so for the iphone 6 above the simulator, there is no problem with the iphone 4s simulator, Under the iOS7.1 is just not loaded launchscreen.xib, this Apple's oldest screen size of course there is no white status. But for iphone5/5s + ios7/7.1, because iOS7 can not be compatible launchscreen.xib this mechanism, and cannot find the corresponding Default-568h.png file, the problem naturally arises.

Problem solving:

On the project configuration page, under General there is a column app Icons and Launch Images, which has a Launch Images Source, if you encounter a problem, then the next display may be a button, use Asset Catalog, Click on it and then make sure that you can generate launchimage in the images.xcassets in your project, just like in Xcode5. At this time to run the program, there is no more up and down the black edge problem. But for a better user experience, make a picture and put it in. Of course, the launchscreen.xib is still loaded in the iOS8, and at least it appears that they can coexist.

Problem extension:

If you want to delete this set of start-up diagram, simply remove the images.xcassets in the launchimage is not possible, but also in the project configuration, Build settings found asset Catalog Launch Image Set Name (Search asset can help you quickly navigate to this), the value of the back to delete. Otherwise the compilation will not pass, error Images.xcassets:None of the input catalogs contained a matching launch image set named "Launchimage".

Xcode6 compiled on Iphone5+ios7 simulator with black edge problem solution

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.