SwiftUI.cc
SwiftUI.cc

SwiftUI reference pages, page 9

Continue browsing practical SwiftUI examples, API notes, pitfalls, and implementation checklists.

Showing 73-77 of 77 reference pages
PreviousPage 9 of 9

SecureField masks input for secrets, pairs with textContentType for password managers and strong-password suggestions, and composes with TextField for reveal toggles.

3 min readOpen

TextEditor binds long-form scrolling text. Style with font and lineSpacing, restyle backgrounds via scrollContentBackground, and manage the keyboard with focus and toolbars.

4 min readOpen

Swift Charts builds charts from marks — BarMark, LineMark, PointMark, AreaMark, SectorMark — each mapping data fields to visual position, with foregroundStyle(by:) for series.

5 min readOpen

Why body returns 'some View', how @ViewBuilder turns multiple statements into one view tree, and what opaque types buy SwiftUI's diffing — the syntax behind every view you write.

5 min readOpen

#Preview declares canvas previews with names, traits like landscape orientation and size fitting, plus @Previewable for stateful previews — fast iteration without running the app.

4 min readOpen