A SwiftUI Kickstart


Introducing the SwiftUI User Interface Framework

Functional Programming Kickstart

This is one of those moments where everything changes. SwiftUI forces you to rethink how to organize your UI and how to architect your app.

SwiftUI takes advantage of the best of the Swift Programming language to build complicated interfaces from lightweight, composable, modifiable, and disposable views such as Text and Image. You'll layout these views using VStack, HStack, ZStack, and GeometryReader.

You'll accept user input from Button, TextField, and Slider and then flow the data through your app using State, Binding, ObservableObject, and the environment. You'll put the pieces together into an app that uses TabView, NavigationView, and Sheet along with List to present a table filled with data.

The book takes you on a journey from the Object-Oriented Model-View-Controller world to the declarative world of SwiftUI.

Contents


Chapter 1: Let's Get Started

A Simple App

Visual Coding

But...

Code: All in One

Code: Smaller Pieces

Info

Version History

Road Map

Chapter 2: Create, Configure, and Layout

The Template

Value Types

View

Some

StackViews

Styling Views

Modifying Views

Function Builders

Generics in Function Builders

Advanced Function Builders

Chapter 3: Call to Action

Button

No Name

State

Flow

Enabling and Disabling Buttons

Properties

Bindings

Slider

Property Wrappers

Parameters and Property Wrappers

Chapter 4: Tabs and Sheets

Reorganizing

A Model Object

Observable Objects

Tabs

Passing References

Singletons

Pickers

The Environment

Sheets

Maintaining Flexibility

Custom Modifiers

Chapter 5: Lists and Navigation

Getting Started

Text Input

Policies

Optional Views

Presenters

Lists

Navigation Views

Detail Views

For Each

Delete a Row

Dumb views

Chapter 6: Making it nicer

Optional Views

Shapes

ZStack

Size and placement

GeometryReader

Path

Accessibility

Code

Related


Training from Dim Sum Thinking

Screenshots


screenshot 1

screenshot 2

screenshot 3