Device Size Classesĭifferent size class combinations apply to the full-screen experience on different devices, based on screen size. For example, when the vertical size class changes from compact height to regular height - such as when the device rotates from landscape to portrait orientation - tab bars may become taller. The system defines two size classes, regular (denotes expansive space) and compact (denotes constrained space), which describe the height and width of a view.Ī view may possess any combination of size classes:Īs with other environmental variations, iOS dynamically makes layout adjustments based on the size classes of a content area. Size classes are traits that are automatically assigned to content areas based on their size. Standard system-provided views automatically adopt a safe area layout guide.įor developer guidance, see Positioning Content Relative to the Safe Area and Positioning Content Within Layout Margins.
The safe area also prevents content from underlapping the status bar, navigation bar, toolbar, and tab bar. These layout guides ensure appropriate insetting based on the device and context. When the keyboard dismisses, the top of the layout guide matches the bottom of the safe area layout guide.Īdhere to the system-defined safe areas and layout margins. You can also define custom layout guides.Ī 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. 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. Layout Guides and Safe AreasĪ layout guide defines a rectangular region that helps you position, align, and space your content on the screen. System feature availability ( 3D Touch)įor developer guidance, see NSLayoutConstraint and UITraitCollection.Internationalization features that are enabled based on locale (left-to-right/right-to-left layout direction, date/time/number formatting, font variation, text length).
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. People generally want to be able to use their favorite apps on all of their devices and in any context.