Want to learn Swift, the powerful programming language for iOS and macOS? Check out these tutorials, and improve your Swift skills starting right now!
Object-Oriented Programming (OOP) in Swift
Object-Oriented Programming (OOP) helps you structure your Swift code. This article introduces classes, objects, properties, functions, and inheritance, and how to use them in Swift. Let's get started!
Functions in Swift Explained
In Swift you use functions to perform specific tasks in your code. It's that simple! In this article you'll learn how to define and call functions, how to use function parameters, and how to return a value from the function.
Variables and Constants in Swift Explained
You use variables and constants in Swift to store information. In this tutorial you'll learn how to declare and initialize variables, how to use them, and how type inference works. Let's get started!
Type Casting in Swift Explained
You use type casting in Swift to treat an instance of one class as another, in the same class hierarchy. In this article you'll learn how to use type casting in Swift. We'll take a look at upcasting, downcasting, checking types, and their syntax.
Promises in Swift
Promises in Swift simplify your asynchronous code. Instead of "callback hell" you create a concise chain of async functions and keep your code clean. Let's find out how!
How To Find Strings with Regular Expressions in Swift
How do you find strings with regular expressions in Swift? In this tutorial, we'll code a function from scratch that extracts hashtags from a string. Happy coding!
Dependency Injection in Swift
Dependency Injection sounds scary... but it's actually pretty simple. On top of that, understanding dependency injection will greatly improve your code quality and productivity as a Swift developer!
Working with UserDefaults in Swift
UserDefaults are useful for storing small pieces of data in your app. You use it to save your app user's settings, set some "flags", or simply use it as a tiny data store. You learn how to use UserDefaults in this article.
FlatMap and CompactMap Explained in Swift
Swift has a bunch of functions that are useful for transforming collections and sequences. In this tutorial, we'll discuss map(_:), flatMap(_:) and compactMap(_:).
Map, Reduce and Filter in Swift
In Swift you use map(), reduce() and filter() to transform collections, like arrays, without using a for-loop. They're quite powerful, but also challenging. Let's dive in!
For Loops in Swift (How To)
Let's get loopy! Loops are used in Swift to repeat code or to iterate over collections. This article shows you how to use for-in, while and repeat-while loops, as well as looping over ranges and collections. (That's a lot of loops...)
Sets in Swift Explained
Sets in Swift are powerful. They're similar to arrays and dictionaries, but also very different... The "Set" collection type is an interesting aspect of Swift programming. Let's find out how you can use it!
Dictionaries in Swift Explained
A dictionary is a fundamental component in Swift programming. With a dictionary you can store key-value data in your app. It's a collection type, similar to an array. In this article you'll learn how to use dictionaries, and much more!
Arrays in Swift Explained
Arrays are fundamental building blocks of apps. They're crucial to mastering iOS development. In this article you'll learn how you can use arrays in your Swift code. Let's get started!
Tuples Explained in Swift
Tuples may look small, but they're quite powerful! You use tuples in Swift to make ordered, comma-separated lists of values. In this article, we'll discuss how you can use tuples in practical iOS development. Let's get to it!
How To Keep Up with Swift Changes
How do you deal with Swift changes as you’re learning how to code iOS apps? It’s a frustration that many beginner iOS developers share. How do you keep up, avoid learning outdated information, and stay up-to-date on latest developments? We’ll find out in this article!
Generics in Swift Explained
Generics are a super powerful feature of Swift. This article explains how generics work, including generic types and protocols, and why they're awesome. Let's get started!
Off-By-One Errors In Swift Programming
Off by one errors, like "Array index out of range", happen in programming when we've got the boundaries of things wrong. In this article, you'll learn what an off-by-one error is and how you can solve it with Swift programming.
Learn Swift Programming The Simple Way
Swift is an easy to learn programming language for iOS, macOS, and more. Learning how to code Swift is simple, a lot of fun, and you can build awesome apps with it! In this article, we'll discuss simple approaches to learn Swift coding.
Computed Properties Explained in Swift
A computed property is a property that calculates and returns a value, rather than just store it. In this tutorial, we'll discuss how computed properties work and how you can use them in your day-to-day iOS development.
Initializers & init() Explained in Swift
An initializer is a function we use to construct objects in Swift. In this article, we're going to discuss how initializers work, why they're needed, and how you can write your own. We'll focus on the different kinds of initializers, such as convenience initializers, what the consequences are of subclassing, errors you may face in day-to-day iOS development, and much more.
Dates, DateComponents and Formatting in Swift
How do you work with date and time in Swift? In this tutorial, we'll discuss how you can convert date/time to strings, and vice versa, how date/time formatting works, how to calculate time durations, and much more.
The Ultimate Guide to Closures in Swift
Closures are blocks of code that you can pass around in your code, as if you assign a function to a variable. They also capture their surrounding scope. Closures are elegant, powerful, and crucial for mastering iOS development. Let's dive in!
Play With Code: Palindromes In Swift
The date 02-02-2020 is a palindrome. Palindromes are words that read the same forward as backward. And they're great fun to play with in Swift! In this article, we'll discuss and code 3 approaches to check if a string is a palindrome in Swift.
Access Control Explained In Swift
In Swift, access control is used to restrict parts of your app's source code by defining public and private APIs. It's an important aspect of Swift development. Let's find out how it works!
Hi, I'm Reinder.
I help developers play with code.
Get the Weekly
- How To Learn iOS App Development
- Learn Swift Programming The Simple Way
- How To Make An App (In 9 Steps)
- For Loops in Swift (How To)
- How To Download, Install and Update Xcode
- Random Numbers in Swift
Code Swift right in your browser!
Go to the Swift Sandbox