DevPrep

All topics

📐 SwiftUI: iOS interview questions

  1. What is SwiftUI and how does it differ from UIKit? Junior PRO
  2. @State, @Binding, @StateObject, @ObservedObject, @EnvironmentObject — what's the difference? Middle PRO
  3. How does @StateObject differ from @ObservedObject in practice? Middle PRO
  4. What is @Observable (the Observation framework, iOS 17+)? Middle PRO
  5. How does SwiftUI decide what to redraw? What are identity and diffing? Senior PRO
  6. some View, ViewBuilder and result builders — what are they? Middle PRO
  7. onAppear vs .task — when to use which? Middle PRO
  8. How do state management and single source of truth work? Middle PRO
  9. What is GeometryReader and why shouldn't you overuse it? Middle PRO
  10. How does SwiftUI integrate with UIKit? Middle PRO
  11. How does a view's lifetime differ from the lifetime of the View struct? Senior PRO
  12. How do you pass data down and events up: let, @Binding, closures, Environment, PreferenceKey? Middle PRO
  13. How does Observation track changes, and where does fine-grained tracking break down? Senior PRO
  14. How does layout work in SwiftUI: size proposal, size choice, placement? Middle PRO
  15. How do you write a custom container with the Layout protocol? Senior PRO
  16. How do you make a long list fast: List, LazyVStack and stable ids? Senior PRO
  17. NavigationStack: how do path, navigationDestination and deep links work? Middle PRO
  18. How do SwiftUI animations work: implicit, explicit, Transaction and transitions? Middle PRO
  19. Who owns a screen's async work: .task, a Task in the model, refreshable and cancellation? Senior PRO
  20. How do you test SwiftUI screens: Previews, model tests, snapshots and UI tests? Middle PRO

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store