SwiftUI Cheat Sheet 2026

The 30 highest-yield SwiftUI facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

  1. What data type does convertedNumber have when this code is run? Int?
  2. What is `TimelineView` used for in SwiftUI? Updating a view on a schedule using a timeline schedule
  3. Which of the following is an example of a widely used third-party library for iOS? AFNetwork.framework
  4. Which modifier controls the rendering mode of an SF Symbol image in SwiftUI? .symbolRenderingMode()
  5. What is `NavigationPath` used for in iOS 16+ SwiftUI navigation? A type-erased list of navigation destinations enabling programmatic stack control
  6. Which gesture type in SwiftUI is used to detect pinching motions for zooming? MagnificationGesture
  7. How do you create a custom view modifier in SwiftUI? Conform a struct to ViewModifier and implement body(content:)
  8. What protocol must a class conform to in order to be used with `@ObservedObject` or `@StateObject`? ObservableObject
  9. What does the `delay` parameter on an animation do in SwiftUI? Delays the start of the animation by the given time interval
  10. What is an LLVM, exactly? Contains Both Compiler (swiftc And Objective C)
  11. What modifier enables drag-to-reorder rows in a SwiftUI List? .onMove(perform:)
  12. How do you set the title shown in the navigation bar for a SwiftUI view? Both B and C work
  13. Which SwiftUI modifier applies a visual effect blur to a view? .blur(radius:)
  14. Which SwiftUI modifier adds a visual hover effect on supported devices without custom logic? .hoverEffect()
  15. Which Swift compiler directive will cause an error to be generated? #error
  16. What is the difference between `.sheet` and `.fullScreenCover` in SwiftUI? .fullScreenCover covers the entire screen including the status bar
  17. How do you chain two gestures so that the second gesture only starts after the first succeeds? firstGesture.sequenced(before: secondGesture)
  18. How do you add a custom transition using `AnyTransition` in SwiftUI? Use AnyTransition.modifier(active:identity:)
  19. How do you add a section with a header to a SwiftUI List? Section(header:) { rows }
  20. What does `@Binding` do in SwiftUI? Creates a two-way connection to a state owned by another view
  21. Keywords are used to create Contants in Swift. Let
  22. Which property wrapper provides edit mode state to a SwiftUI List? @Environment(\.editMode)
  23. How do you conditionally show a view in SwiftUI? if condition { view }
  24. What does `.phaseAnimator(_:content:animation:)` do in SwiftUI (iOS 17)? Cycles through a sequence of phases, animating between them
  25. What happens to a `@State` variable when a SwiftUI view is destroyed and recreated? It resets to its initial value
  26. Which SwiftUI type provides a canvas for immediate-mode drawing similar to Core Graphics? Canvas
  27. What does applying `.colorMultiply(_:)` do to a SwiftUI view? Multiplies each pixel's color by the given color
  28. In Swift, we can return multiple values from a function by using? Tuple
  29. Which SwiftUI control presents a list of options for the user to choose from? Picker
  30. How do you make List rows deletable in SwiftUI? .onDelete(perform:) inside ForEach