
Begin with Swift as a complete beginner and progress to intermediate and advanced topics, building iPhone apps and websites while getting Swift up and running on your computer.
Install Swift on your Mac by downloading the free Xcode from the Mac App Store, launch it, and set up the Swift development environment.
Install Swift on a Linux machine by downloading from swift.org, extracting the package, and updating your PATH. Verify the install with swift --version and explore running Swift on Linux.
Learn how to set up swift on Windows and run swift in the browser using tools like the IBM swift sandbox and swift playground.
Discover variables and constants as the building blocks of Swift, with an introductory section that guides you through what you'll learn and what to expect.
Learn how to declare variables in Swift, using var, naming without spaces, and assigning values such as age and mom age through a playground to see live updates.
See how variables hold values and can change, from numbers to words with quotes. Observe updating mood and type consistency when changing values.
Learn how constants work in Swift 4 by declaring them with let, how they differ from variables, and how camel case naming helps keep values like birth year readable.
Continue in Swift 4 by exploring print line and comments, plus a bonus for Linux and Windows users, as you move beyond variables and constants.
Explore print and comments as developer tools that ease coding and collaboration, not changing your code. Understand how print works and why comments matter to prepare Linux and Windows users.
Learn how to use print in Swift to output information to a log, print strings with quotes, and print variables like age to track changes.
Learn to run Swift on Windows and Linux, use prints to display hello world and variables, and set up a local environment with PATH, a text editor, and the REPL.
Learn to use Swift comments to leave notes in code that aren’t run, using // for inline notes, and place comments to plan and communicate with others.
Learn how to write and use multiline comments in Swift to temporarily disable code and document ideas, using block comments with /* and */ and practical examples.
Explore print in Swift across playgrounds, browser, and Linux, and learn to use comments to annotate code for clarity in apps and websites.
Explore strings, the fundamental way to represent text and numbers in Swift, and see how you’ve already worked with them, plus bonus tips to make strings do cool things.
Learn how strings represent text in Swift with double quotes, create string variables, and use dot methods like uppercased and lowercase, including empty strings and emojis.
Learn how emojis in Swift are Unicode characters used in strings and as variable names, with macOS input tips and Japanese keyboard support.
Discover how ints represent whole numbers in Swift, distinguish them from doubles, and use string interpolation to build dynamic sentences with age, wallet, and name.
Discover how types define variables in Swift, using int and string examples, with optional explicit annotations and Swift’s type inference, and note common type errors.
Learn Swift basics like print and comments, useful for using the browser or Linux, and laying a foundation for apps and websites as you dive into Swift.
Debunk the myth that math skills determine programming success and learn basic arithmetic in Swift, explore exponent rounding, and introduce floats and doubles.
Learn basic math in Swift using a playground, including addition, subtraction, multiplication, and division. Create and use variables to compute tips and totals, and control operation order with parentheses.
Learn about doubles and floats in Swift, including how decimals default to double, how int division differs from floating point division, and when to use a float.
Swift developers learn to mix doubles and ints with type casting. It shows when to convert to double or int and how to perform math with matching types.
Explore advanced math in Swift by importing Foundation, using ceiling and floor for rounding, pow for exponents, and plus-equals or minus-equals for in-place updates.
Learn how booleans and if statements empower Swift programs to make decisions, and see how you can tell the computer what you want it to do with ease.
Discover booleans and the basics of if statements, and learn how boolean values let your code make decisions and bring it to life.
Explore booleans by declaring true or false variables and using them to drive decisions, such as today is Friday, and prepare for if statements.
Solve if statements in Swift by using a boolean payday to update a wallet, print the balance with string interpolation, and complete a birthday challenge.
Learn to compare values in swift using >, <, ==, !=, >=, <= and string equality, then apply booleans in if statements with wallet purchase examples.
Explore how if statements evaluate booleans and control flow with else and else if, using examples that print messages like you bought a switch game or food at 7-Eleven.
This lecture demonstrates how to use and and or operators to combine boolean conditions in if statements, with examples using age, weight, and citizenship to decide who can ride.
Celebrate finishing the basic Swift section as you mastered booleans, if statements, and logical operators such as and or; prepare for intermediate and advanced concepts.
Explore arrays and sets as core collection types, treating arrays as ordered lists, and preview dictionaries as a future topic while learning how these collections hold objects.
Learn how arrays store ordered, same-type items, create arrays with brackets, add with append or plus-equals, access by zero-based index, and insert or remove elements.
Learn how to specify array types in Swift, create empty and prefilled arrays, use count and isEmpty, access ranges, and append elements, with practical boolean and candy examples.
Discover how sets in Swift store unique items with no fixed order, offering insert, remove, contains, and count operations. Create empty or prefilled sets and verify membership using contains.
Explore arrays and sets in Swift 4, noting how arrays preserve order in lists like songs and candy, while sets prevent duplicates, and this connects to the section on loops.
Explore loops in Swift 4, including for and while loops, and learn how they work with arrays to transform computation into automatic, fast operations.
Master for loops in Swift by iterating through ranges, printing outputs, and using a loop variable to traverse from 1 to 10, with underscores for readability.
Explore for loops in Swift to iterate arrays and sets, printing elements, numbering items, and building new arrays, with practical examples like candy bars and vacation spots.
Master while loops in Swift by understanding pre-check conditions, avoiding infinite loops, and contrasting with repeat-while; practice iterating arrays with a while loop to print each element.
Explore how for loops, while loops, and repeat while loops power Swift programs, and learn how these loops work with arrays, sets, and dictionaries.
Explore dictionaries as another type of collection alongside arrays and sets, and briefly cover for loops to show how dictionaries store values in a different way.
Explore dictionaries as a key-value collection in swift: create, update, and remove entries with unique keys; learn type syntax and flexible value types through practical dog and foods examples.
Explore how to loop through dictionaries in Swift 4 using for loops, access keys and values, and print structured data like dog names and ages, using tuples for clarity.
Explore Swift collection types, including arrays, sets, and dictionaries, and learn how dictionaries tally word frequencies from a text to build a word counter.
Explore how functions give a name to a chunk of code, accept inputs, and return outputs. See how these ideas organize code and relate to classes for Swift programming.
Explore how to define and call functions in Swift, including naming conventions and how functions avoid repeating code by encapsulating prints like Hello World, with practical examples using loops.
Explore how parameters control function input in swift 4, from simple ints to multiple values, including examples like squaring numbers and a dog info function with name, age, and color.
Learn to implement Swift functions that take inputs and return values, using a square example and a dog info sentence to demonstrate return types, printing, and type safety.
Discover how functions give you a named chunk of code to reuse, pass parameters to customize behavior, and return information, making Swift development essential from intermediate to advanced levels.
Have you ever wanted to try out programming but didn't know where to start? Have you previously tried to learn Swift but got fed up with incomplete YouTube videos and poorly written tutorials? Or are you looking to move your code from Swift 3 to 4?
THEN THIS IS THE COURSE FOR YOU!
In my Swift 4 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, but even more importantly... I care about you!
What is Swift?
Swift is a programming language that allows you to write software for iPhones, iPads, Macs, Apple Watches, Apple TVs, desktops, servers, or anything else that runs code! Swift is great for new programmers because it is very intuitive, it continues to evolve as Apple adds new features, it is relatively easy to catch software bugs compared to other languages, and you can see your results immediately by running code in a Playground.
In 2014, Apple announced Swift, along with a 500-page manual explaining how this brand-new language worked. So I immediately jumped into that manual and within three days I created the internet's first Swift course! Since then, Swift has always been my favorite language to teach and I love how it keeps evolving! I have now taught over 60,000 students how to code with Swift, and I'm excited to have you join us. It's going to be a lot of fun :) Also, 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!
Contents and Overview
I believe we learn best by doing. So, in this course, every lecture is followed up by an exercise for you to test what you just learned. This format will allow you to actually learn Swift and not just follow along like a robot ;)
In this course I will lead you through setting up Swift locally, describe the basics of the language, explain how it compares to other common languages (including Objective C), and show you 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 be fluently programming in Swift 4 and will have the base knowledge needed to develop custom applications. You will also get experience working with Xcode's new Playground file, which allows you to learn code is a quick and interactive way, giving you immediate results.
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. Additionally, I have made this course downloadable, so you can work through the class offline, making it as convenient as possible for you!
Don't waste your time scouring the internet and trying to piece together how to learn Swift on your own. Invest in yourself, and allow me to teach you how to program with Swift while having fun.
Don't take my word for it. See what my other students are saying!
"Outstanding course, Nick has simply simplified swift language to a level where there is no way you won't get it. this is the best introduction to swift language ever." - Fouad Tir
"Nick is fantastic and very knowledgeable! I recommend this course to anybody that wants to get started in swift." - Coty Markham
"This course is fun and the instructor is, too. He is personable and that makes it easy to start learning. He talks in plain English and his examples are good. One of the better courses I have watched. Thanks." - Gordon Feinberg
"Awesome course! Very clearly explained in a way that makes it easier to digest and integrate the concepts than any other course I have tried. I highly recommend it." - Richard Wiig
I am so confident that you will love my course, that I even offer a 100% 30-day money-back guarantee. You have nothing to lose, so come join me and let's get started!