IOS iphone 4inch app is not full screen, with black edge up and down

Source: Internet
Author: User

In the process of writing an iOS application. I have been using the iphone Retina (3.5-inch) simulator to test, everything shows normal, cut graphs such as the following:

I use the pure Code implementation in the application development.

The company provided a iphone4s, and I used it to test everything to show normal. The problem is that when I use the IPhone5 and iphone5s real machine tests, I find that my application is not covered on the screen in IPhone5 and iphone5s, but there is a black on the top and bottom of the application screen. For example, the following:

Check the problem steps:

I started to examine my code carefully. found that in the entire project, there is no place in the setting screen height when the fixed value of 480, are directly to get the screen size, and then set the screen size.

Second, check the project resources. Confirm that you have joined Default.png, [email protected], [email protected] to launch pictures and other resources.

Third, I began to search the Internet, to see if there is a similar problem, they are how to solve, and try to provide various methods of netizens (there is said to have Xib, in the xib inside set a view of their own active layout; Assuming pure code, Manually set the UIView AutoLayout, ... )。 At last there was no result.

In the process, see a netizen due to this problem, resulting in the release of the application was rejected by Apple.

How to resolve:

1, I accidentally found that once I wrote the demo can be in the iphone5s of the normal display, I will create a new project, and then directly execute, showing normal. I was so excited at the moment.

2, I carefully control the similarities and differences between two items, found that "project configuration what are the same", the heart is wondering, no problem.

3, finally found that the configuration of a project is this, such as the following:

Previously written demo project configuration for example with:

cause iphone Portrait iOS need to R4 the boot image, assuming that there is no corresponding boot image, the system will feel is a 3.5inch device .

There will be a black edge up and down just need to put launch image is configured to the following diagram of the option can be, detailed operations such as:

Drag and drop the prepared picture into the corresponding box in the Launchimage. Delete the original app,cleanproject on your phone. Just one more execution!

IOS iphone 4inch app is not full screen, with black edge up and down

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.