Overview
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.
Prerequisites
- Knowledge of Swift.
- Familiarity with writing tests using XCTest.
- A computer with macOS and Xcode installed.
What you'll learn
Introduction
- 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
- Modifiers
- Frames
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.
Navigation
- NavigationView and NavigationLink
- Showing modal views
- Showing Alerts and ActionSheets.
- Showing ContextMenus.