Ios-size Class Usage Tutorials

Source: Internet
Author: User

1: It introduces a new concept, discard the traditional meaning we adapt to the so-called specific wide-height size, the screen width and height are divided into two cases: compact-compact, regular-Normal (any-arbitrary, in fact, this is the combination of 2, so I did not divide into 3 cases) 3, that is, regardless of the change, add up to 9.

2:

Iphone4s,iphone5/5s,iphone6,iphone6plus,iphone6s,iphone6s Plus

Vertical screen: (w:compact h:regular)

Horizontal screen: (W:compact h:compact) ( except iphone6plus/iphone6s plus )

Horizontal screen: (W:regular h:compact) ( includes iphone6plus/iphone6s Plus only)

Ipad

Vertical screen: (W:regular h:regular)

Horizontal screen: (W:regular h:regular)

3: For example, the project has a demand when the screen display is not the same. I give an example: when the horizontal screen display only 4 view, when the vertical screen display 5 view. At this point size classes to play its function.

A: First of all, we put four view on the controller and add the corresponding constraint (the default selection of the size class of the controller is Any-any).

The operation model is as follows:


B: I need to customize the vertical screen when a view is displayed in the middle of the controller, first set the size class to c-c. The operation model is as follows:

C: The effect of the demonstration diagram

Ios-size Class Usage Tutorials

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.