The article explains how to create custom shapes by conforming to the Shape protocol. It starts with a basic triangle, then moves to an advanced star shape with configurable points and smoothness. It also covers animatable shapes using the Animatable protocol and common use cases like charts, logos, and progress indicators.
The article explains what makes Swift enums different from enums in other languages. It covers associated values (each case carries its own data), raw values (mapping to Int or String), computed properties and methods on enums, using enums with Error handling, recursive enums with indirect cases, and replacing class hierarchies with enums. It also includes a comparison with Kotlin sealed interfaces.
The article shows how Swift 6 concurrency features (default MainActor, isolated conformances, Sendable) affect protocol design. Using a simple DatabaseModel protocol, it explains why a conformance can fail due to isolation mismatch with Identifiable. It walks through solutions like changing default isolation, using nonisolated, requiring Sendable, or switching to async protocol requirements.
The article explains what inout parameters are, how copy-in copy-out works under the hood, and when to use them versus return values. It covers basic examples (incrementing, swapping, mutating collections), important rules (using &, variables only, no conflicting access), common mistakes, and best practices.
This newsletter issue covers iOS interview and coding topics. It includes how to answer the Single Responsibility Principle question strongly, designing an image caching system with memory, disk, and network layers, a SwiftUI tip about using @StateObject instead of @State for reference types, and a hot take on AI tools widening the gap between engineers who understand principles versus those who memorize patterns.