Skip to content

Latest commit

 

History

History
107 lines (75 loc) · 6.44 KB

5-1.Adaptivity and Layout.md

File metadata and controls

107 lines (75 loc) · 6.44 KB

Adaptivity and Layout

People generally want to be able to use their favorite apps on all of their devices and in any context. To meet this expectation, design an adaptable interface by configuring UI elements and layouts to automatically change shape and size on different devices, during multitasking on iPad, in split view, when the screen rotates, and more.


Device Screen Sizes and Orientations

iOS devices have a variety of screen sizes and people can use them in either portrait or landscape orientation. In edge-to-edge devices like iPhone X and iPad Pro, the display has rounded corners that closely match the device’s overall dimensions. Other devices — such as iPhone SE and iPad Air — have a rectangular display.

If your app runs on a specific device, make sure it runs on every screen size for that device. In other words, an iPhone-only app must run on every iPhone screen size and an iPad-only app must run on every iPad screen size.

Device Dimensions (portrait)
12.9" iPad Pro 1024x1366 pt (2048x2732 px @2x)
11" iPad Pro 834x1194 pt (1668x2388 px @2x)
10.5" iPad Pro 834x1194 pt (1668x2388 px @2x)
9.7" iPad Pro 768x1024 pt (1536x2048 px @2x)
7.9" iPad mini 768x1024 pt (1536x2048 px @2x)
10.5" iPad Air 834x1112 pt (1668x2224 px @2x)
9.7" iPad Air 768x1024 pt (1536x2048 px @2x)
10.2" iPad 810x1080 pt (1620x2160 px @2x)
9.7" iPad 768x1024 pt (1536x2048 px @2x)
iPhone 13 Pro Max 428x926 pt (1284x2778 px @3x)
iPhone 13 Pro 390x844 pt (1170x2532 px @3x)
iPhone 13 390x844 pt (1170x2532 px @3x)
iPhone 13 mini 375x812 pt (1125x2436 px @3x)
iPhone 12 Pro Max 428x926 pt (1284x2778 px @3x)
iPhone 12 Pro 390x844 pt (1170x2532 px @3x)
iPhone 12 390x844 pt (1170x2532 px @3x)
iPhone 12 mini 375x812 pt (1125x2436 px @3x)
iPhone 11 Pro Max 414x896 pt (1242x2688 px @3x)
iPhone 11 Pro 375x812 pt (1125x2436 px @3x)
iPhone 11 414x896 pt (828x1792 px @2x)
iPhone XS Max 414x896 pt (1242x2688 px @3x)
iPhone XS 375x812 pt (1125x2436 px @3x)
iPhone XR 414x896 pt (828x1792 px @2x)
iPhone X 375x812 pt (1125x2436 px @3x)
iPhone 8 Plus 414x736 pt (1080x1920 px @3x)
iPhone 8 375x667 pt (750x1334 px @2x)
iPhone 7 Plus 414x736 pt (1080x1920 px @3x)
iPhone 7 375x667 pt (750x1334 px @2x)
iPhone 6s Plus 414x736 pt (1080x1920 px @3x)
iPhone 6s 375x667 pt (750x1334 px @2x)
iPhone 6 Plus 414x736 pt (1080x1920 px @3x)
iPhone 6 375x667 pt (750x1334 px @2x)
4.7" iPhone SE 375x667 pt (750x1334 px @2x)
4" iPhone SE 320x568 pt (640x1136 px @2x)
iPod touch 5th generation and later 320x568 pt (640x1136 px @2x)

NOTE

All scale factors in the table above are UIKit scale factors, which may differ from native scale factors. For developer guidance, see scale and nativeScale. To learn how screen resolution impacts your app’s artwork, see Image Size and Resolution.


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. For example, you can constrain a button so it’s always horizontally centered and positioned eight points below an image, regardless of the available screen space.

Auto Layout automatically readjusts layouts according to the constraints you specify for certain environmental variations, known as traits. You can set your app to dynamically adapt to a wide range of traits, including:

  • Different device screen sizes, resolutions, and color gamuts (sRGB/P3)

  • Different device orientations (portrait/landscape)

  • Split view

  • Multitasking modes on iPad

  • Dynamic Type text-size changes

  • Internationalization features that are enabled based on locale (left-to-right/right-to-left layout direction, date/time/number formatting, font variation, text length)

  • System feature availability (3D Touch)

For developer guidance, see NSLayoutConstraint and UITraitCollection.


Layout Guides and Safe Areas

A layout guide defines a rectangular region that helps you position, align, and space your content on the screen. 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.

A safe area defines the area within a view that isn’t covered by a navigation bar, tab bar, toolbar, or other views a view controller might provide.

iOS 15 and later defines a keyboard layout guide that represents the space the keyboard currently occupies and accounts for safe area insets. Using this guide can help you make the keyboard feel like an integral part of your app, regardless of the type of keyboard people use or where they position it. For developer guidance, see UIKeyboardLayoutGuide.

Adhere to the system-defined safe areas and layout margins. These layout guides ensure appropriate insetting based on the device and context. The safe area also prevents content from underlapping the status bar, navigation bar, toolbar, and tab bar. Standard system-provided views automatically adopt a safe area layout guide.

For developer guidance, see Positioning Content Relative to the Safe Area and Positioning Content Within Layout Margins.


애플 공식 문서

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