iOS8 new features screen fitting Sizeclass

Source: Internet
Author: User
Tags compact

iOS8 launched also has a period of time, because of time is tight, so did not go to learn the new features of iOS8,
With the launch of iphone6,6+, iOS screen adaptation is a big problem, how to successfully adapt to a variety of sizes and ipad?
Apple has given new technology to solve this problem sizeclass
Here are some of my notes on Sizeclass study, I hope to be useful to you:

1> screen adaptation of the development process
Code calculation--autoreszing (relationship between parent control and child control IOS6), AutoLayout (any control can produce a relationship iOS7), Sizeclass (iOS8)

2> sizeclass Role: iOS8 in order to solve the screen adaptation, introduced a new concept, sizeclass and this use does not need to judge the size of the screen, there is no horizontal screen and vertical screen concept, only (Compact, any,regular) concept! In Xcode new project, see the storyboard interface below the column, there is a (Wany,hany) Click will appear an optional similar nine Gongge table, this is a screen selector, you can choose different screens!  

    • Just sort the screens and actually arrange the UI elements to use AutoLayout

    • There is no longer a concept of the screen size, only the concept

    • No longer have the concept of specific dimensions, only the concept of abstract dimensions

    • The width and height are divided into 3 cases, and the combination of 3*3 is 9.
      1) Compact: tight (small)
      2) Any: arbitrary
      3) Regular: Loose (Large)
      4) symbol represents

    • : Compact

    • : any

    • : Regular
      5) Inheritance (use as few * combinations as possible, which is likely to lead to conflict)


      • : All 8 other cases will inherit


      • : will be--\ +-Inherit


      • : will be +-\ + + Inherit
        6) Role of Sizeclass and AutoLayout
        Sizeclass: Simply classifying the screen (judging the screen)
        AutoLayout: Constrain the various elements in the screen (position \ Size)





        Before, writing the project is handwritten code or use storyboard controversy, as Apple's guidance finally has the answer, use SB!


iOS8 new features screen fitting Sizeclass

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.