Lecture 1 / 12
Lecture 01 ยท Fundamentals

Introduction to Swift & Setup

Beginner ~50 min

What is Swift?

Swift is a powerful, intuitive programming language developed by Apple for building iOS, macOS, watchOS, tvOS, and server-side applications. It combines the performance of C/C++ with modern, safe language features.

Why Swift?

  • Clean, expressive syntax
  • Memory safety and optionals
  • Excellent performance
  • Seamless integration with SwiftUI and UIKit

Installation & Setup

Download the latest Xcode from the Mac App Store (includes Swift). For Windows/Linux, use Swift.org toolchain.

Swift Playground / main.swift
print("Hello, Swift Mastery!")
print("Ready to build amazing iOS apps!")
Output
Hello, Swift Mastery!
Ready to build amazing iOS apps!
๐ŸŽฏ Exercise 1.1

Open Xcode โ†’ Create a new macOS Command Line Tool project. Modify it to print your name and run it.

Lecture 02 ยท Fundamentals

Variables & Data Types

Beginner ~45 min

let vs var

Use let for constants and var for variables. Swift encourages the use of constants whenever possible.

let pi = 3.14159
var score = 0
score += 10
Lecture 03 ยท Fundamentals

Operators & Control Flow

Beginner ~50 min

Switch Statements

Swift's switch is extremely powerful and doesn't require break.

switch grade {
case "A": print("Excellent")
case "B"..."C": print("Good")
default: print("Keep trying")
}
Lecture 04 ยท Fundamentals

Optionals & Unwrapping

Beginner ~60 min

Dealing with Nil

Optionals are a type that can either hold a value or nil.

var name: String? = "Tim"
if let actualName = name {
    print(actualName)
}
Lecture 05 ยท Fundamentals

Loops & Collections

Beginner ~45 min

Dictionaries

var heights = ["Taylor": 1.78, "Ed": 1.73]
for (name, height) in heights {
    print("\(name) is \(height)m tall")
}
Lecture 06 ยท Core Concepts

Functions & Closures

Intermediate ~60 min
func greet(person: String) -> String {
    return "Hello, \(person)!"
}
Lecture 07 ยท Core Concepts

Structs, Classes & Enums

Intermediate ~70 min

Structs vs Classes

Structs are value types (copied), Classes are reference types (shared).

Lecture 08 ยท Core Concepts

Protocols & Extensions

Intermediate ~50 min

Protocol-Oriented Programming

Protocols define a blueprint of methods or properties.

Lecture 09 ยท Advanced

Error Handling & Generics

Advanced ~60 min
do {
    try fetchData()
} catch {
    print("Error: \(error)")
}
Lecture 10 ยท Advanced

Property Wrappers & Concurrency

Advanced ~55 min

Modern Swift uses async and await for concurrent code.

Lecture 11 ยท Advanced

SwiftUI Basics

Advanced ~60 min

Declarative UI

struct ContentView: View {
    var body: some View {
        Text("Hello SwiftUI")
    }
}
Lecture 12 ยท Capstone

Capstone Project: iOS App

Advanced ~180 min

Create a full SwiftUI application that fetches data from an API and displays it in a beautiful list with detailed views.

// Project goals:
// 1. Model your data with Codable
// 2. Use URLSession for networking
// 3. Build a multi-view SwiftUI navigation
// 4. Implement State and Binding