결론
iOS는 디바이스 크기 별로 할당되는 content area의 Size classes의 값을 토대로 다이나믹하게 layout 조정을 한다.
- Size classes: 디바이스 별로 시스템이 두개로 정의함 (compact, regular)

 

Adaptivity and Layout

  • In iOS, interface elements and layouts can be configured to automatically change shape and size on different devices, during multitasking on iPad, in split view, when the screen is rotated, and more.
  • It’s essential that you design an adaptable interface that provides a great experience in any environment.

Auto Layout

  • Auto Layout is a development tool for constructing adaptive interfaces.
  • Using Auto Layout, you can define rules (known as constraints) that govern the content in your app.
  • Auto Layout automatically readjusts layouts according to the specified constraints when certain environmental variations (known as traits) are detected. 

Layout Guides and Safe Area

Layout guides define rectangular regions that don’t actually appear visibly onscreen, but aid with the positioning, alignment, and spacing of content. The system includes predefined layout guides that make it easy to apply standard margins around content and restrict the width of text for optimal readability. You can also define custom layout guides.

 

Size Classes

  • In iOS, Size Classes are groups of screen sizes that are applied to the width and height of the device screen
  • The system defines two size classes. The two Size Classes that exist currently are Compact and Regular.
    - The Compact Size Class refers to a constrained space. It is denoted in Xcode as wC (Compact width) and hC (Compact height).
    - The Regular Size Class refers to a non-constrained space. It is denoted in Xcode as wR (Regular width) and hR (Regular height).
  • As with other environmental variations, iOS dynamically makes layout adjustments based on the size classes of a content area.
    (For example, when the vertical size class changes from compact height to regular height, perhaps because the user rotated the device from landscape to portrait orientation, tab bars may become taller.)

 

 

 

Ref.

https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/adaptivity-and-layout/

https://www.bignerdranch.com/blog/designing-for-size-classes-in-ios/

 

'iOS > iOS 기본기' 카테고리의 다른 글

토큰 기반의 인증  (0) 2019.12.21
[iOS] Delegate, Notification, KVO 비교 및 장단점 정리  (0) 2019.12.10
[iOS] Layout - Safe Area  (0) 2019.12.09
[iOS] frame vs. bounds  (0) 2019.12.09
[iOS] int vs NSInteger vs NSNumber  (0) 2019.12.05

+ Recent posts