New characteristics, IPhone6 and iphone6plus adaptation of Xcode6

Source: Internet
Author: User


The Apple Conference is over this year, but people seem to be less interested in iPhone6 and Iphone6plus, and iwatch are looking forward to it. This time Apple released two screen size phones at a time, and it was different from the size of the previous model. This for developers, is undoubtedly the most worried about, before the app in the IPhone6 and Iphone6plus will be the layout of the whole mess.


Don't worry, Apple will certainly take into account these problems: although the screen resolution has changed a lot, but 5, 5s, 6, 6+ their screen aspect ratio is consistent, are 16:9; The previous app installed on 6 or 6 + will not be affected, scales, fills the entire screen, Xcode6 the previous version of the project, runs on 6, and its coordinate system is the same as before; Xcode6 created projects whose coordinate system 5s, 6, 6+ are different;

Before the coordinate system we all know is 320*480 and 320*568, then the new iphone coordinate system will be how much. I created a new project with the XCODE6GM version, and the data after the test on storyboard, code, Xib were:

IPhone6:

2014-09-15 11:15:52.104 x6test[1766:62602] SB screen bounds = {0, 0}, {375, 667}}
2014-09-15 11:15:52.105 x6test[1766:62602] SB view bounds = {0, 0}, {375, 667}}
2014-09-15 11:15:53.304 x6test[1766:62602] Code screen bounds = {0, 0}, {375, 667}}
2014-09-15 11:15:53.305 x6test[1766:62602] Code View bounds = {0, 0}, {375, 667}}
2014-09-15 11:15:57.913 x6test[1766:62602] xib screen bounds = {0, 0}, {375, 667}}
2014-09-15 11:15:57.913 x6test[1766:62602] xib view bounds = {0, 0}, {600, 600}}


Iphone6plus

2014-09-15 11:24:07.164 x6test[1855:66991] SB screen bounds = {0, 0}, {414, 736}}
2014-09-15 11:24:07.165 x6test[1855:66991] SB view bounds = {0, 0}, {414, 736}}
2014-09-15 11:25:06.637 x6test[1855:66991] Code screen bounds = {0, 0}, {414, 736}}
2014-09-15 11:25:06.638 x6test[1855:66991] Code View bounds = {0, 0}, {414, 736}}
2014-09-15 11:25:08.834 x6test[1855:66991] xib screen bounds = {0, 0}, {414, 736}}
2014-09-15 11:25:08.834 x6test[1855:66991] xib view bounds = {0, 0}, {600, 600}}


In addition, using XCODE6 to open old projects, the new class will have the same coordinate system as before.


What changes have Xcode6?


1, in the new project when less options, such as the Common Empty project:



2, in order to better fit the screen size, in the Xib settings added size options:


3, the project has no PCH file, need to create their own, then create how to think before the same let Xcode themselves to compile it. Set in Build settings:



4, the project has added a xib file: Launchscreen.xib, as the name suggests, when the program is started to call, and the previous launch image similar, this xib will be more flexible to use:


5, in Images.xcassets added IPhone6 and iphone6+ of the start picture and iphone6+ horizontal screen Picture:



Initial use of new version of Xcode6, newly features found so much, later updated; On the adaptation of the individual feel that with autolayout+ ratio, if there is a better way to welcome the message discussion.

Reprint Please specify address: http://blog.csdn.net/yujianxiang666



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.