Front-end development for iPhone 5/iOS 6

Source: Internet
Author: User
Detect iPhone 5/iOS 6

 

It's easy to detect iOS 6. Use UA:

Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) applewebkit/536.26 (khtml, like gecko) version/6.0 mobile/10a403 Safari/8536.25

However, if the UA of all iPhone iOS 6 is used for this purpose, JavaScript or media query is required to determine if the UA is iPhone 5:

JS:

Isphone 4inches = (window. Screen. Height = 568 );

CSS:

@ Media (device-Height: 568px) and (-WebKit-Min-device-pixel-ratio: 2) {/* iPhone 5 or iPod Touch 5th generation */}
 
HTML5 support: file API:
Input type = "file"> <! -- Single file --> <input type = "file" multiple> <! -- Multi-file->

Only images and videos can be uploaded. Other formats cannot be uploaded.

*Remote debugging
The new remote debugging tool allows you to debug safari pages on iOS on PC/MAC more conveniently. The interface is similar to Chrome browser on Android.

Related Article

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.