Layout and adaptive interfaces
Arrange views into rows, columns, and grids. Adapt the same interface to the available space, device insets, and scrolling content.
In this section
- How layout works - Use constraints, desired sizes, alignment, margin, and container padding to place views.
- Stacks and FlexBox - Choose content-sized stacks or wrapping flexible rows and columns.
- Grid layouts - Combine fixed and fractional tracks with named areas and spans.
- Adapt to available space - Reflow a shared page from measured width rather than guessing a device category.
- Safe areas and device geometry - Keep controls within safe bounds and distinguish logical coordinates from display pixels.
- Scrolling content - Give ScrollView a bounded viewport and place larger content inside it.
Explore the full Reference for related topics.