
Discover what makes Swift different from other languages, including its question mark and exclamation syntax. Learn generics, error handling, and guard to create a modern, safe, reusable code base.
Learn Swift error handling by separating concerns, using throw and do-catch, and choosing between try, try?, and try! to manage optionals and errors safely.
discover how subscripts enable concise access to array and dictionary values using brackets, returning values with optional handling and defaults, and why context matters for readable code.
Explore sets, arrays, and tuples in Swift 4, learn to eliminate duplicates, perform set operations like union and intersection, and convert between arrays and sets with mutating vs non-mutating methods.
Explore Swift property observers by adding willSet and didSet to a stored property, track old value and new value, and differentiate from computed properties through practical login and UI examples.
Master Swift closures by returning and passing closure blocks, both directly and indirectly. Learn closure syntax, including first-parameter brackets and the dollar sign for arguments.
Learn how to initialize objects with closures in Swift and why lazy initialization defers heavy work until needed, enabling dry, reusable UI components.
Master closures in Swift by passing and returning closure blocks to and from functions, create objects using closure blocks, and understand the lazy keyword and the unique behavior of closures.
Learn protocol extension to provide default implementations and write less code. See practical examples like GPA defaults and area calculations for rectangles and hexagons, with UIKit animation.
Understand how closures in Swift are reference types that can cause retain cycles and learn to prevent them with weak or unowned captures, including self.
Explore executing tasks with the functional paradigm in Swift and why it trends across platforms, with a focus on closures and generics.
Explore how filter works in Swift's functional programming, using closure blocks to filter arrays, create generic custom filters, and apply practical examples like filtering grades and even numbers.
Conclude the chapter by exploring functional programming in Swift, focusing on filter and map, and understanding what goes on under the hood of each function, including reactive programming ideas.
Explore protocol extensions and type constraints in Swift, using where clauses and self to restrict generic behavior, and work with associate types for scalable code.
Explore error handling using the result type to create modular, reusable code in Swift, contrast with try-catch, and apply clear success and failure cases for API calls.
Explore Swift key paths and optional chaining to access properties and methods efficiently, store a key path, and choose when to apply them for clearer code.
Master advanced codable techniques by implementing custom encoding and decoding with CodingKeys, containers, and a bespoke encoder or decoder to flexibly map keys and properties.
Explore advanced dictionary concepts in Swift, including optional values, default values, initializing from sequences, grouping by first letters, and functional operations like map, filter, and zip.
Attention
*Please note the course is no longer maintained since 2017.
Why I Created Learn Swift with Bob
As a developer whose first programming language is Swift, I've taken online courses from major platforms. However, I have been frustrated by a lack of detailed explanation from instructors. They tend to focus on final products, thus missing out the fundamentals. I was confused by which design principles to follow, and why. Soon after I've been blogging for the last 5 months, I've discovered this isn't the only problem of mine. I've received hundreds of emails and questions regarding how to write code that does not violate principles such as DRY, modularity, and readability. As a result, I've decided to create this course dedicated for my younger self. I believe it all comes down to the fundamentals which I lacked in the beginning.
Course Overview
There are 10 chapters in this course. From Chapter 1 to 4, you will get a firm understanding of both Intro to Functional, and protocol, and Object Oriented Programming. In Chapter 5, you will fully understand how objects are created and removed. In Chapter 6 and 7, you will learn how to create value oriented swift code along with protocol generics and enums. In the last chapter, you will acquire various advanced and hidden tips about the Swift Programming Language.
Prerequisites
This course is designed for Swift intermediates. So, I won't cover the basics. You may visit the lecture notes and go to prerequisites. You will find a list of items you are expected to know. There is a YouTube video for each concept, so if you ever get stuck, you can always learn and come back. In a nutshell, you should be already be familiar with switch statement, conditional statement, basic operators, functions, and basic object oriented programming.
Questions
Do you know why Swift engineers have implemented optionals? Do you know what completion handlers and how to design one for your project? Do you know retain cycle within closures and delegates? Do you know the difference between autoclosures, trailing closures, and @escaping closures? Do you know how to create custom operators. Do you truly understand the statement, "Swift is a protocol oriented programming language", and know how to use default protocols such as Equatable, Comparable, Sequence, and Iterator Protocol. Lastly, do you know the difference between normal and recursive enums? If you can't answer all of these questions, I recommend you to take this course and start learning with me.
Course Resources
Group Chat
Lecture Notes
Source Code
Explanations
Supporting Tutorials
Bob the Developer
Over thousands of daily visitors from students and iOS developers all around the world. Less than half a year, I became one of the top bloggers standing right next to big named brands. You don't have to question my quality of content. The growth and reputation speak for themselves.
p.s: Lecture notes, source code, explanations are available at any time. They are created, prepared, and edited by Bob the Developer.