Extensions in Swift
Extensions add new functionality to an existing type, even one you don’t own, like Int, String, or URL. They’re also how Swift...
A personal blog by Deya Elkhawaldeh
Insights, ideas, and practical guides on
Swift, iOS development, and the Apple ecosystem.
Extensions add new functionality to an existing type, even one you don’t own, like Int, String, or URL. They’re also how Swift...
Access control decides which parts of your code can see which other parts. It lets a type hide its implementation behind a...
The term test doubles draws inspiration from stunt doubles in the movie industry, where a stunt double steps in to perform dangerous...
An initializer sets an object up; a deinitializer gets the last word before it disappears. In Swift, deinit runs automatically when an...
In many languages, an enum is just a list of named integers. In Swift, enums are full types: they can carry data,...
Control flow decides which code runs and how many times. Swift’s toolbox looks familiar if you’ve used any C-style language, but almost...
iOS accessibility is about building apps that people with disabilities can use as fully and independently as everyone else. Apple ships a...
A custom SwiftUI view is usually a small struct describing part of an interface. Recreating that struct does not necessarily recreate the...