Skip to content

SwiftUI forms

New Course Coming Soon:

Get Really Good at Git

SwiftUI provides several form controls that we can use to get input from the user.

Think about the Settings app on your iPhone.

That app can be built using the built-in form controls that we’re going to soon see, like:

All of those are going to be wrapped in a Form view:

Form {


This tells SwiftUI that this is a form, and SwiftUI will present the content in a way that it conforms to how a form should look, on the specific platform you run it on (iPhone, Mac, Watch..).

This is part of the declarative aspect of SwiftUI. We wrap our form controls in a Form view to tell it it’s a form, then it makes decisions for us.

We’ll see more about forms by covering each individual form control.

Are you intimidated by Git? Can’t figure out merge vs rebase? Are you afraid of screwing up something any time you have to do something in Git? Do you rely on ChatGPT or random people’s answer on StackOverflow to fix your problems? Your coworkers are tired of explaining Git to you all the time? Git is something we all need to use, but few of us really master it. I created this course to improve your Git (and GitHub) knowledge at a radical level. A course that helps you feel less frustrated with Git. Launching May 21, 2024. Join the waiting list!
→ Get my Swift Handbook

Here is how can I help you: