SwiftUI.cc
Latest SwiftUI references

Latest SwiftUI references, page 4

Continue browsing the newest published SwiftUI examples, API notes, and implementation checklists.

Showing 28-36 of 77 reference pages
PreviousPage 4 of 9Next

containerRelativeFrame sizes a view as a fraction of its nearest container — full width, one-of-three columns, or custom math — without GeometryReader.

4 min readOpen

Modern ScrollView is configured declaratively: scrollTargetBehavior for paging and snapping, scrollPosition for tracking, contentMargins for insets, plus bounce and disable controls.

5 min readOpen

ScrollViewReader exposes a proxy whose scrollTo(_:anchor:) jumps to any child with an id — chat bottoms, section indexes, and back-to-top buttons.

4 min readOpen

Lazy stacks create children only as they scroll into view and support section headers that pin to the edge while their section passes.

4 min readOpen

LazyVGrid scrolls vertically and fills columns described by GridItem: fixed, flexible, or adaptive — the three words that define every grid design.

5 min readOpen

LazyHGrid scrolls horizontally and fills rows defined by GridItem heights — the sideways twin of LazyVGrid for shelf and timetable layouts.

4 min readOpen

List renders platform-native rows from data. ForEach adds onDelete and onMove editing, and a selection binding turns rows tappable with single or multi-select.

5 min readOpen

Restyle List without leaving it: listRowBackground, listRowInsets, separator visibility and tint, listRowSpacing, listSectionSpacing, and scrollContentBackground.

5 min readOpen

swipeActions adds leading and trailing buttons with full-swipe control, refreshable wires async pull-to-refresh, and badge annotates rows with counts.

4 min readOpen