Lesson 01 · iOS with Swift & SwiftUI
iOS: Swift Fundamentals
Swift fundamentals for developers who already know Python: let and var with type inference, the optionals system, value types vs reference types, protocols, enums with associated values, error handling and closures.
Prerequisites: Object-oriented design
Learning objectives
By the end of this lesson, you will be able to:
- Declare constants and variables with let and var, letting Swift infer types
- Unwrap optionals safely with if let, guard let and the nil-coalescing operator
- Predict struct vs class assignment behavior from value vs reference semantics
- Define labeled functions, protocol-conforming types and enums with associated values
- Handle throwing functions with try, do-catch, try? and closures