Intermediate everything in iOS & Swift, page 8

UISceneDelegate: Managing Your App's UI Instances
Think of SceneDelegate as the lifecycle manager for a single window of your app's UI. It's essential for multi-window iPad apps, handling when a scene connects, disconnects, or changes state.

UIHostingController: Bridge SwiftUI into UIKit Apps
UIHostingController is an adapter that lets you use modern SwiftUI views inside a UIKit app by wrapping them in a UIViewController. This is key for migrating apps to SwiftUI or embedding new components.

SwiftUI List: More Than Just a Table View
A SwiftUI List is a declarative container for scrollable rows of data, like a modern UITableView. Use it for settings, feeds, or contact lists. The footgun: never nest a List inside a ScrollView, as it breaks scrolling behavior.

SwiftUI Modifiers: Stacking Changes on Views
Think of SwiftUI modifiers as non-destructive filters you apply to a view, creating a new, wrapped version with the change applied. You use them to add padding, set fonts, or handle taps. The footgun: modifier order matters immensely.

SwiftUI State and Binding: Owning vs. Sharing Data
In SwiftUI, @State is owning the data, while @Binding is borrowing a key. A view uses @State for its private source of truth, like a toggle's status, and passes a @Binding to child views so they can modify the original source.

UICollectionView: Grids, Stacks, and Custom Layouts
UICollectionView is a powerful tool for displaying items in customizable layouts, going far beyond a simple vertical list. Use it for photo galleries or App Store-style interfaces.

UITableView: The Backbone of iOS Lists
UITableView is the workhorse for displaying scrolling lists in iOS. It's used everywhere from Settings to Contacts. The footgun is forgetting to reuse cells, which causes massive memory usage and choppy scrolling, so always dequeue a reusable cell.

Swift Package Manager: Native Dependency Management
Swift Package Manager (SPM) is Apple's built-in librarian for your project's code dependencies. You use it to add, remove, and update third-party libraries directly in Xcode. The main footgun is that version conflicts between dependencies can break your build.

Xcode View Debugger: Uncover Hidden UI Bugs
The View Debugger is like an X-ray for your UI, showing every view and constraint in a 3D stack. Use it to find clipped labels, missing views, or un-tappable buttons. The common footgun is forgetting that invisible views can still block user input.
LLDB: Stop Time with Breakpoints
A breakpoint is a red light for your code, pausing execution at a specific line so you can inspect your program's state. In Xcode, use it to freeze your app when a bug occurs, examine variables, and step through code.

Auto Layout: Describing Relationships, Not Frames
Auto Layout lets you describe a UI by its relationships, not hardcoded coordinates. You declare "this button is centered and 8 points below the logo," and the system calculates its position.

Xcode Schemes vs. Build Configurations
Schemes are *what* you build (the target and action), while Configurations are *how* you build (the settings). Use them to manage environments like Debug vs. Release, each with its own API keys. The footgun is putting environment settings directly in a Scheme.
Opaque Types: Hide Implementation, Not Capabilities
Opaque types (some Protocol) hide a function's concrete return type, exposing only its protocol conformance. This lets you change the implementation later (e.g., from ReverseCollection) without breaking client code that just needs some Collection.

Key-Path Expressions: Type-Safe Pointers to Properties
A key path is a type-safe "pointer" to a property, like \User.name. It lets you pass around a reference to a property itself, not just its value, making it ideal for generic sorting or SwiftUI data binding. The footgun is forgetting they are strictly typed.
Associated Types: Making Protocols Generic
Associated types make protocols generic. Think of them as a "fill-in-the-blank" type name. A protocol like Sequence has an Element type, which a conforming Array<String> fills in as String.
Copy-on-Write (CoW) in Swift
Copy-on-write lets Swift's Array, Dictionary, Set, and String share one underlying buffer across copies until one is mutated, giving full value-type semantics with the performance of sharing, deferring the actual copy until it is truly needed.
Retain Cycles and Capture Lists in Swift
A retain cycle is a memory leak where two objects hold strong references to each other, preventing deallocation. This often happens in closures that capture self, like network callbacks.
Swift Error Handling: Throwing, Catching, and Propagating
Swift error handling uses a dedicated channel for failures. Functions declare they can fail with throws, you handle them with do-catch, or transform them into optionals with try?. The footgun is overusing try!, which crashes your app on failure.
Swift Structs vs. Classes: Value vs. Reference Types
In Swift, a struct is a copied value (like a new document), while a class is a shared reference (like a link to one document). Use structs for simple data like coordinates; use classes for shared state like a user session.
Swift Optionals: Handling Nothing Safely
An Optional is like a box that might contain a value or might be empty (nil). You must safely unwrap it before using the value, preventing crashes. It's used for properties that might not exist yet or for function returns that can fail.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles