swift

Property wrappers for SwiftUI state

SwiftUI property wrappers manage state and data flow declaratively. @State creates mutable state owned by a view for simple values. @Binding creates two-way connections to pass state down the hierarchy without ownership. @ObservedObject watches extern

UIKit UITableView with diffable data source

Diffable data sources modernize UITableView and UICollectionView, automatically calculating and animating changes. Instead of manually calling insert/delete methods, I create snapshots with current state and apply them. The framework diffs snapshots a

App lifecycle and scene management

iOS 13 introduced scene-based lifecycle for multi-window support on iPad. The App and Scene delegates handle different lifecycle events. SceneDelegate manages individual scenes—windows on iPad or the single window on iPhone. It responds to state trans

StoreKit for in-app purchases

StoreKit enables selling digital goods and subscriptions within iOS apps. I request product info from App Store Connect with product identifiers, then display prices in the user's currency. Purchase flows use SKPaymentQueue to add transactions, which

SwiftUI animations and transitions

SwiftUI makes animations declarative and automatic. The .animation() modifier animates state changes with built-in curves like .easeInOut, .spring(), or custom timing. Explicit animations use withAnimation {} blocks to scope which changes animate. Tra

UIKit delegates and protocols

Delegates enable objects to communicate events and customize behavior. The delegate pattern uses protocols to define a contract—I create a protocol with optional and required methods, and the delegating object holds a weak reference to avoid retain cy

Sign in with Apple authentication

Sign in with Apple provides secure, privacy-focused authentication required for apps with third-party login. Users create accounts with Face ID or Touch ID, and Apple generates unique identifiers per app. I use ASAuthorizationController to initiate th

AVFoundation for media playback

AVFoundation provides comprehensive audio and video capabilities. AVPlayer plays media from URLs or local files with playback controls. AVPlayerLayer renders video content in views. I observe player state with KVO or Combine to track playback progress

Haptic feedback with UIFeedbackGenerator

Haptic feedback provides tactile responses that enhance user experience. iOS offers three feedback generators: UIImpactFeedbackGenerator for physical impacts with light, medium, or heavy intensities; UINotificationFeedbackGenerator for success, warnin

SwiftUI custom shapes and paths

Custom shapes enable unique UI designs beyond standard views. Conforming to Shape protocol requires implementing path(in:) that returns a Path describing the geometry. I use path methods like move(to:), addLine(to:), addArc(), and addCurve() to draw c

SwiftUI GeometryReader for dynamic layouts

GeometryReader provides parent view size and coordinates, enabling dynamic layouts that adapt to available space. The reader passes a GeometryProxy with size and coordinate space info. I use it for responsive designs—calculate grid columns based on wi

Accessibility with VoiceOver support

Accessible iOS apps work for all users, including those with disabilities. VoiceOver reads UI elements, requiring proper labels and hints. I set .accessibilityLabel() for non-text elements like images and buttons, describing what they represent. .acce