Pages in WebView compatible with Iphone6 and 6+

Source: Internet
Author: User

Actually write this article should not be me, but should be the development of iOS small partners, but as a front-end, I think I still need to do a record!

First of all, I would like to say in Iphone6 or 6+ in the WebView nested page width is not 320px, but 375px and 414px, and because of this, so it produced a compatibility problem,

That is, the font blur in the page, no doubt, the solution is already there ~

Problem:

On Iphone6 and 6+, page fonts in WebView are blurred

Solve:

Small partners who develop iOS need to enable "high-resolution mode" with two enabled methods:

1. Add the launchimage of the large screen:
In Images.xcassets, delete the old Launchimage group, and then create a new Launchimage group to add the corresponding high-resolution picture. Here's a more detailed description: How to Add a Launch Image for the IPhone 6.

2. Add Launch screen File

Launch screen is a new feature of Xcode6 and IOS8, and it uses a xib file as a splash. This property is automatically ignored when the app is launched in the previous version of iOS and does not cause an exception.
First, click New File->ios User Interface->launch screen, and then enable it in the project setup:

The above two settings allow the app to enter high-resolution mode as long as any one is enabled, but if neither is set, the app will fall back to compatibility mode. Given that many apps now need to be compatible with IOS5, and the first method may have bugs on iOS5, the second approach is recommended.

All right! I think the problem has been solved ~ Although the front-end does not need to change anything, but when encountering this problem, who do not know where the wrong, of course, if you know this solution, will be able to speed up the development process ~

Note: Here casually say, this method is not I want to come out, but in the Internet to find a lot of information found, of course, also succeeded ~

Pages in WebView compatible with Iphone6 and 6+

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.