Skip to content
tezvyn:

iOS & Swift

SwiftUI, UIKit, Xcode, Swift language, Apple platforms

180 bites

Test yourself: Top 30 iOS & Swift concepts questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Concepts in iOS & Swift, page 3

The Responder Chain: Who Handles That Tap?
advanced2 min read

The Responder Chain: Who Handles That Tap?

The Responder Chain is iOS's chain of command for events. When a user taps the screen, the event travels up a view hierarchy, asking each object, "Can you handle this?" until one accepts. Accidentally breaking this chain can silently kill event handling.

ObservableObject: Making Data Drive SwiftUI Views
advanced2 min read

ObservableObject: Making Data Drive SwiftUI Views

ObservableObject lets your custom data classes signal SwiftUI views to refresh when data changes. Use it for reference types like a user profile or settings manager. Changes are ignored unless you mark properties with @Published, leaving your UI stale.

UIViewRepresentable: Bridging UIKit and SwiftUI
advanced2 min read

UIViewRepresentable: Bridging UIKit and SwiftUI

UIViewRepresentable is an adapter that lets you use battle-tested UIKit views inside your modern SwiftUI code. Use it for components like WKWebView that lack a native SwiftUI equivalent.

iOS App States: From Launch to Suspension
easy2 min read

iOS App States: From Launch to Suspension

An iOS app is like a person with different states of alertness: focused (Active), distracted (Inactive), or napping (Background/Suspended). This lifecycle dictates how your app behaves during interruptions.

The AppDelegate: Your App's Central Command
easy2 min read

The AppDelegate: Your App's Central Command

Think of the AppDelegate as your app's command center, receiving critical notifications from the OS. It handles core events like launch, termination, or receiving a push notification. The footgun is bloating it with logic that belongs elsewhere.

Model-View-Controller (MVC): Separating App Logic from UI
easy2 min read

Model-View-Controller (MVC): Separating App Logic from UI

MVC organizes code by separating data (Model) from the user interface (View), using a Controller as the go-between. This is the foundational pattern for many UI frameworks, like Cocoa and UIKit. The main footgun is the "Massive View Controller."

UISceneDelegate: Managing Your App's UI Instances
intermediate2 min read

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.

MVVM: Separate SwiftUI Logic from Layout
intermediate2 min read

MVVM: Separate SwiftUI Logic from Layout

MVVM separates logic from layout by moving state and business logic out of your SwiftUI View into a dedicated ViewModel class. This makes your code cleaner, more organized, and easier to test.

Dependency Injection in Swift: Stop Creating, Start Receiving
intermediate2 min read

Dependency Injection in Swift: Stop Creating, Start Receiving

Dependency Injection means objects receive their dependencies from the outside rather than creating them internally. It's used to give a view model a network client or data source, making it testable.

iOS Background Modes: A Hall Pass for Your App
intermediate2 min read

iOS Background Modes: A Hall Pass for Your App

iOS background modes are like hall passes, letting your app perform specific tasks like playing audio or tracking location after the user switches away. They're used for music players or navigation apps.

The Singleton Pattern: One Instance to Rule Them All
intermediate2 min read

The Singleton Pattern: One Instance to Rule Them All

A singleton ensures a class has only one instance and provides a global access point to it. It's used for shared resources like a network manager or logger. The main footgun is that overuse creates tight coupling and makes testing difficult.

The Coordinator Pattern: Untangling iOS Navigation
advanced2 min read

The Coordinator Pattern: Untangling iOS Navigation

The Coordinator pattern makes a separate object the 'boss' of app navigation, leaving view controllers to just manage their view. This lets you reuse views in different flows without them knowing what comes next.

VIPER: Taming Massive iOS View Controllers
advanced2 min read

VIPER: Taming Massive iOS View Controllers

VIPER is a strict architectural pattern that tames "Massive View Controllers" by splitting features into five layers: View, Interactor, Presenter, Entity, and Router. It's used in large iOS apps to make business logic and navigation explicitly testable.

iOS State Preservation: Resume Where You Left Off
advanced2 min read

iOS State Preservation: Resume Where You Left Off

Think of it as an automatic bookmark for your app's UI. When iOS terminates your app, state preservation can save the user's place, restoring the view hierarchy on next launch.

UINavigationController: Stack-Based Screen Management
easy2 min read

UINavigationController: Stack-Based Screen Management

UINavigationController manages screens like a deck of cards: you push new ones on top and pop them off to go back. It's standard for hierarchical navigation. The footgun is manually changing the stack; always use the provided push/pop methods.

UITabBarController: Your App's Main Switchboard
easy2 min read

UITabBarController: Your App's Main Switchboard

A UITabBarController manages a row of buttons at the bottom of the screen to switch between an app's main sections. Use it for distinct, non-sequential modes like 'Recents,' 'Contacts,' and 'Voicemail'. The footgun is using it for a step-by-step process.

Storyboard Segues: Visual UI Flow in iOS
easy2 min read

Storyboard Segues: Visual UI Flow in iOS

A Storyboard Segue is a visual arrow connecting two screens in your iOS app, defining a navigation path without writing code. Use them to transition from a list to a detail view. The biggest mistake is forgetting to use prepare(for:sender:) to pass data.

TabView: SwiftUI's Built-in Tab Bar
easy2 min read

TabView: SwiftUI's Built-in Tab Bar

TabView lets you show different views in the same space, switched by a tab bar. It's the standard for top-level app navigation, like switching between "Home," "Search," and "Profile." The footgun is nesting them; they are for main sections only.

NavigationStack: Programmatic Navigation in SwiftUI
intermediate2 min read

NavigationStack: Programmatic Navigation in SwiftUI

Think of NavigationStack as a pile of views. You push new views onto the stack programmatically by appending to a path array. This is SwiftUI's modern, data-driven way to handle deep navigation, replacing the older, buggier NavigationView.

NavigationLink: Pushing Views in SwiftUI
intermediate2 min read

NavigationLink: Pushing Views in SwiftUI

NavigationLink is SwiftUI's declarative way to push a new view onto a navigation stack. You use it inside a NavigationStack to create drill-down UIs, like tapping a list item to see its details. The footgun is forgetting the parent NavigationStack.

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