Learn Swift and SwiftUI, free, in your browser
Nine short sessions that take you from your first SwiftUI screen to navigation, data flow, lifecycle, SwiftData and Charts. Every SwiftUI example runs live beside an iPhone preview, and plain Swift runs as you type, so you can learn on Windows, Linux or a Chromebook.
Start the interactive course →- 0. Exam essentials (start here)
Short on time? This lesson covers the topics that come up most in the MCQ, the Xcode practical and the viva, in plain words, with a live app preview beside every example.
About 60 min - 1. Swift fundamentals
The Swift you need before SwiftUI makes sense: types, collections, closures and optionals, with the exam traps that catch people.
About 25 min - 2. Custom types and object-oriented Swift
How Swift models data: enums, structs and classes, value versus reference semantics, protocols, generics and error handling. Every SwiftUI view and model you write later…
About 30 min - 3. SwiftUI fundamentals
How a SwiftUI app is put together: the App and its scenes, views as small structs, modifiers and why their order matters, stacks, frames, conditional views, ForEach and…
About 20 min - 4. State, bindings, controls and forms
Where a SwiftUI screen keeps its data, how a child view edits its parent's data, every common input control, and forms that validate, move focus and remember settings.
About 30 min - 5. Lists, observation and environment
Scrolling lists with sections, editing, swipe actions and search; tree data; and how iOS 17's Observation framework shares a model between views, compared with the older…
About 40 min - 6. Navigation and presentation
How a SwiftUI app moves between screens: stacks, value-based links, paths you control in code, tabs, sheets, alerts and toolbars, with the exam traps around each.
About 40 min - 7. Lifecycle, animation and persistence
When views appear and disappear, how SwiftUI animates changes, and how an app saves data: Codable and JSON, UserDefaults, files and SwiftData.
About 25 min - 8. Swift Charts
Draw bar, line, point, area, rule, rectangle and sector charts with Swift Charts, customise axes, colours and legends, add selection and scrolling, and prepare the data…
About 50 min
What's in the course
- Live SwiftUI previews: edit the code and the phone updates.
@State,@Binding,@Observable, NavigationStack, sheets and alerts really run. - Runnable Swift examples and "predict the output" questions.
- Exam traps, viva questions with answers, quizzes and a timed mock exam.
- A 4–5 hour cram plan and a 38-lab practical workbook.
Is this Apple's SwiftUI?
No. ViewLab runs SwiftUI code in the browser with its own engine, which covers the parts you need to learn and practise. To publish an app you still need Xcode on a Mac; ViewLab can export a starting project for it.