A SwiftUI Kickstart


Introducing the SwiftUI User Interface Framework

SwiftUIKickstart

This is one of those moments where everything changes. SwiftUI is the future for developers targeting Apple platforms and “A SwiftUI Kickstart” is designed to quickly get experienced Swift developers up and running with clear code-along examples.

Whether you are developing for iOS, macOS, iPadOS, WatchOS, or all of them at once, SwiftUI forces you to rethink how to create your UI and how to communicate and respond to changes in state in different nooks and crannies of your app.

SwiftUI takes advantage of the best of the Swift Programming language to allow you to build complicated interfaces from lightweight, composable, modifiable, and disposable views such as Text, Image, and Shapes.

This book shows you how to get the most out of these fundamental building blocks and the components you’ll use to compose them including VStack, HStack, ZStack, and GeometryReader.

You'll accept user input from Buttons, TextFields, Pickers, and Sliders and then flow the data through your app using ordinary properties, State, Bindings, ObservedObjects, StateObjects and EnvironmentObjects.

You’ll fit a ton of information onto a screen using ScrollViews, Lists, and Grids as well as Expanding Lists and DisclosureGroups. One screen is never enough so you’ll build navigation into your apps using Sheets, TabViews, and NavigationViews.

A SwiftUI Kickstart introduces you to the light-weight, value-typed, declarative world of SwiftUI.

You need a Mac running the latest version of Xcode as this book has been updated to the very latest versions of SwiftUI, Swift, and Xcode.

Contents


Chapter 1: Let's Get Started

Hello, World!

Previews

ContentView

Links and Credits

Version History

Road Map

Chapter 2: Create, Configure, and Layout

Value Types

Views

Some

StackViews

Positioning Views

Modifying Views

Result Builders

Generics in Result Builders

Advanced Result Builders

Chapter 3: Call to Action

Buttons

State

Properties

View Modifiers

Closures

Bindings

Creating Bindings

Observable Objects

Property Wrappers

Chapter 4: Lists and Grids

Labels

ForEach

Scrolling

Lists

Grids

DisclosureGroups

Expanding Lists

Chapter 5: Navigation and App Data Flow

Tab Views

Text Input

Policies

Sheets

The Environment

Observed Objects

Navigation Views

Navigation Links

Page Tab Views

Chapter 6: Making it nicer

Lifecycle and App Storage

Shapes

ZStacks

Size and Placement

GeometryReader

Path

What's next?

Related


Training from Dim Sum Thinking

Screenshots


screenshot 1

screenshot 2

screenshot 3