Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

Swift & SwiftUI

Learn the Swift language that SwiftUI apps are written in. You will store values, work with Swift's types and optionals, combine them with operators, and steer a program with conditions, loops and functions — all while building the logic of one small habit-tracker app.

Ready to learn6 sections · 24 lessons
Start learning

Course curriculum

Introduction to Swift3 lessons

Meet the language behind SwiftUI: where it came from, where it runs, what it protects you from, and how to recognise the Objective-C code it grew out of.

  1. What Swift Is and Where It Runs12 min
  2. Why Use Swift?12 min
  3. Swift vs Objective-C12 min
Swift Basics5 lessons

Get Swift running, store Sprout's facts in constants and variables, control their types, print them with string interpolation, and keep the code readable with comments.

  1. Installing Swift12 min
  2. Constants and Variables12 min
  3. Type Annotations and Type Inference12 min
  4. Print and String Interpolation12 min
  5. Comments and Semicolons12 min
Swift's Data Types5 lessons

Choose between Int and Double, work with Bool and String, convert types on purpose, handle missing values with optionals, and group values with tuples.

  1. Integers, Floats and Doubles12 min
  2. Booleans and Strings12 min
  3. Type Safety and Type Casting12 min
  4. Optionals and nil12 min
  5. Tuples12 min
Operators4 lessons

Do Sprout's arithmetic with the right precedence, ask questions with comparisons, build bigger conditions with logical operators, and supply defaults for optionals with ??.

  1. Arithmetic Operators12 min
  2. Comparison Operators12 min
  3. Logical Operators12 min
  4. The Nil-Coalescing Operator12 min
Control Flow4 lessons

Make decisions with if and switch, repeat work over ranges and lists with for-in, and loop an unknown number of times with while and repeat-while, steering with continue and break.

  1. if and else12 min
  2. switch and case12 min
  3. for-in Loops12 min
  4. while, repeat-while, break and continue12 min
Functions3 lessons

Package Sprout's logic into functions, design parameters with argument labels, defaults and inout, and choose return types that match the shape of each answer.

  1. Basic Functions12 min
  2. Parameters and Argument Labels12 min
  3. Return Types12 min