
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn to install Swift and set up Xcode on Mac using the Mac App Store, and start writing your first Swift line, with separate lectures for Windows and Linux installations.
Discover how Swift, Apple’s beginner-friendly language, empowers you to learn coding through a personal journey from early app ideas to teaching new programmers.
Ask questions in the course's question-and-answer system to get fast answers, and be adventurous by practicing concepts, doing exercises, and building your own Swift projects.
Install and open Xcode to set up a playground and write your first Swift line by typing hello world to display it on screen.
Explore variables and constants as the building blocks of Swift, using a math-like counting analogy to show why they matter in basic programming.
Discover how Swift playgrounds in Xcode let you write code and instantly see results on the right, customize fonts and colors, and explore ideas quickly.
Learn how variables hold values in Swift using var, by creating an age variable and assigning 27. Update the value to see changes reflect, and use quotes for strings.
Learn how variables work in Swift by tracking changes to age and name through simple assignments, updating values per line, and enforcing type consistency.
discover how constants use let to hold unchanging values, compare them with variables, and learn why a constant cannot be reassigned once set.
Explore the differences between variables and constants in Swift as containers for information. Learn that variables can change, while constants cannot, and practice with short exercises.
Explore strings as a foundational Swift concept and their connection to variables and constants. Build on your existing knowledge to see how strings fit into Swift.
Learn how Swift strings represent text using double quotes, assigned to variables or constants, with examples like Nick. Explore empty strings and basic string transformations such as uppercased and lowercased.
Explore how emoji and Unicode enhance Swift code by using emoji in strings and variable names, enabling multilingual, readable, and internationalized programming.
Discover how Swift uses int types to represent numbers, assign ages, and perform basic math, while understanding why integers cannot become strings.
Demonstrates string interpolation in Swift by embedding variables like name and age into sentences using the backslash-parenthesis syntax, so updates to those values reflect automatically in the output.
Discover how types distinguish values in Swift by declaring variables and constants as int or string. Use type notation with colons to enforce the correct type and prevent mismatches.
Build a solid foundation in Swift by writing Swift code and exploring playgrounds. Move into math and numbers to see the exciting potential of programming.
Master math in Swift by learning basics—multiplication, division, addition, subtraction—and advanced topics like exponents and rounding, while exploring strings, floats, doubles, and core types.
Explore math in Swift using a playground, performing addition, subtraction, multiplication, and division with integers and decimals, and learn order of operations and parentheses affect results with variables like age.
Explore floats and doubles in Swift, comparing decimal numbers to integers, and showing how doubles offer higher precision and why Swift defaults to double for numbers with decimals.
Mix ints, floats, and doubles by aligning types for arithmetic, and cast to double or int as needed; temporary casts won’t change the original variables and round down when converting.
Master floor and ceiling in Swift for rounding, apply pow for exponents, and use plus equals to update a wallet value with Foundation support.
Build a solid foundation in Swift and math, then move forward in the course. Ask questions or share comments to keep learning, and proceed to the next section.
Explore booleans and if statements, adding one more type to your knowledge as code becomes alive through decisions. See how booleans drive decisions and let code respond to different situations.
Learn that booleans are a simple type with two options, true or false, demonstrated through a sunny outside example, showing how booleans power if statements.
Learn how if statements use a boolean to decide whether to run code, using a payday wallet example that adds 100 when true and skips when false, illustrating top-to-bottom execution.
Explore how comparisons generate booleans to drive if statements, using greater than, less than, and equal checks on numbers and strings with a payday wallet example.
Learn how the else clause extends if statements in Swift by checking if age is 18 or older to classify as adult or minor, with a practical example.
Explore how and or boolean operators govern code flow using an amusement park ride example with age and height. Implement conditions to determine when someone can ride.
Review booleans, a fifth core type, and statements that bring your code to life in this Swift 3 course outro, then move to comments and prints for a lighter section.
Explore comments and print in Swift, easy to understand yet important, as we ease into more and more advanced topics after the if statement section.
Learn how to use comments in Swift code to leave notes that don’t run, using two forward slashes to annotate a wallet example with payday and a bonus.
Learn how to use multiline comments in Swift, alongside single line comments, to temporarily disable code, explain code, and manage Xcode projects.
Learn how to use print to send text and values to the console in Swift, including strings, booleans, and numbers, and view output in playgrounds and Xcode for debugging.
Jump into the next section as you ramp up to learn fun, advanced topics, building on clear print comments to reinforce coding concepts.
Explore switches in Swift by converting grade-based if statements into a cleaner switch statement, using cases for A through F, with default handling and feedback messages.
Learn how the default case in Swift switch statements acts as a catch-all when any possible value isn't matched, with examples for strings, booleans, and ints.
Learn how to use multiple matching in switch statements to group cases and execute shared code, and see vowels versus consonants in Swift.
Learn interval matching in Swift by using a switch with age ranges like 0–5, 6–17, 18–65, and 66–150 to execute targeted code.
Wrap up the switches and if statements discussion, showing when switches fit best for cleaner code. Proceed to arrays as the Swift 3 course heats up.
Explore arrays, a fundamental programming concept that appears across languages and software, and learn to think of arrays as ordered lists of items found in apps and websites.
Explore arrays as ordered lists in Swift, using movie titles as a string array, lucky numbers as integers, and booleans, while learning type annotations and array syntax.
Learn to append elements to arrays in swift and use the count to determine size, while understanding constant versus variable arrays.
Learn to get a specific item from an array using zero-based indexing, and update an item by assigning a new value at that index, with a movies example.
Insert items into an array at a specific index, shifting later elements and preserving order; remove items at a given position, and avoid index out-of-range errors by respecting 0-based positions.
Learn how contains checks a Swift array for a value, returning a boolean, Spider-Man and Ferris Bueller's Day Off; pair with index to locate position, or nil if not found.
Understand arrays as ordered lists behind everyday software, from inbox emails and tweets to music players, and see how these lists drive interfaces as you scroll.
Explore how loops work by running a chunk of code repeatedly, with a focus on for loops you can control to repeat a set number of times.
Master Swift for loops by repeating code over a numeric range and printing Hello world, from 1 to 10 up to 100000, using underscores for readability.
Count with Swift 3 by using for loops over ranges, replacing the underscore with a named variable k to print numbered hello world messages as you iterate.
Explore what's new in Swift 3 and highlight the major changes. Decide whether to migrate, with emphasis on the open-source nature of Swift.
Explore API stabilization in Swift 3 to keep code written for Swift 3 compatible across future minor versions like 3.1 and 3.2, while acknowledging early limits.
Explain the deprecation of ++ and -- in Swift 3 and demonstrate replacing them with += 1 and -= 1 for clearer, more learnable code.
Swift replaces C style for loops with range based loops like for i in 0..<10, which Xcode can auto fix. Use ranges or underscores for clearer, modern Swift code.
Learn how Swift 3 enforces parameter names at call time, demonstrating a: 5 and b: 7, and discuss the shift toward explicit, named parameters as the default style.
Adopt lowercase camel case for enum cases in Swift, with examples like north and northWest, to follow community style guidelines and avoid breaking code.
Learn how Swift simplifies code with short names, such as using at instead of insert at, and adopt color literals to pick colors directly without dot color prefixes.
Learn how to migrate existing Swift apps to Swift 3 using Xcode 8's conversion tool, including handling warnings, changes in naming, and version control recommendations.
Move from swift two to three while highlighting AB stabilization, plus removing plus plus, adjusting c-style for loops, parameter thing changes, and using the xcode migration tool.
Have you ever wanted to try out programming? Have you tried to learn Swift, only to get fed up with incomplete YouTube tutorials and poorly written tutorials? Looking to move your code from Swift 2 to 3?
THIS IS THE COURSE FOR YOU!
In my Swift 3 course, I will walk you through all the essential information you need to write swift code. I'm a self taught programmer so I know what it feels like to start from scratch. I care about your learning.
I believe we learn best by doing. So, in this course, every lecture is followed up by an exercise for you to test yourself. This format will allow you to actually learn Swift and not just follow along like a robot ;)
Swift was open sourced in December of 2015 so you can now take this course even if you are on a Linux or Windows computer!
A Modern Language Evolved from Objective C
Swift is a multi-paradigm programming language developed by Apple for use with iOS and OS X. Designed to replace Objective C, work began on Swift in 2010 and the first mobile app was debuted in June 2014 at the Worldwide Developers Conference. Despite its goal of replacing Objective C, Swift is capable of working alongside the more dated Objective C language while using the Cocoa and Cocoa Touch frameworks.
Swift is built with the LLVM compiler included in Xcode 6 beta, and uses the Objective-C runtime, allowing Objective-C, Objective-C++ and Swift code to run within a single program. During it’s debut, Swift was described as “Objective C without the C” by Apple’s VP of Software Engineering Craig Federighi.
Contents and Overview
In this course, you will be lead through setting up Swift locally, the basics of the language, how it compares to other common languages (including Objective C), and how to get started on new projects.
The course is designed to provide a comprehensive introduction to Swift, so that you can begin experimenting right away. Upon completion, you will understand the foundations of Swift code and will be able to develop custom applications. You will also get experience working with Xcode's new .playground file.
Course material is regularly refreshed to include all of the newest updates and information, and since you’re granted lifetime access upon registering, you can rely on this course to keep your Swift skills on the cutting edge.