SwiftUI is a declarative framework to write user interfaces in Swift. It provides a unified way of writing UIs for every Apple platform: iOS, iPadOS, macOS, watchOS, and tvOS. This course provides the fundamentals that you need to understand in order to use SwiftUI in your projects.
- Knowledge of Swift.
- Familiarity with writing tests using XCTest.
- A computer with macOS and Xcode installed.
What you'll learn
- What is SwiftUI?
- Why is SwiftUI necessary?
- Writing declarative user interfaces.
- Anatomy of a SwiftUI view.
Widgets and modifiers
- Simple widgets: Text, Button, Image, TextField, Toggle, Picker, Stepper...
- Layout: VStack, HStack, ZStack, Group
Previewing SwiftUI views
- Creating a preview with PreviewProvider
- Customizing the preview
State management and view binding
- @State, @binding, @ObservedObject
- @ObservableObject, @published
- @Environment, @EnvironmentObject
Lists and Forms
- Creating a list of elements.
- ForEach and Identifiable.
- Creating a Form.
- Adding Sections to lists and forms.
- NavigationView and NavigationLink
- Showing modal views
- Showing Alerts and ActionSheets.
- Showing ContextMenus.