Loading...
Loading...
Use when implementing iOS 17+ SwiftUI patterns: @Observable/@Bindable, MVVM architecture, NavigationStack, lazy loading, UIKit interop, accessibility (VoiceOver/Dynamic Type), async operations (.task/.refreshable), or migrating from ObservableObject/@StateObject.
npx skill4agent add johnrogers/claude-swift-engineering swiftui-patterns| Need | Use (iOS 17+) | NOT |
|---|---|---|
| Observable model | | |
| Published property | Regular property | |
| Own state | | |
| Passed model (binding) | | |
| Environment injection | | |
| Environment access | | |
| Async on appear | | |
| Value change | | |
@Observable@State@Bindable.task { }NavigationStackNavigationPath.accessibilityLabel().accessibilityHint()| Reference | Load When |
|---|---|
| Observable | Creating new |
| State Management | Deciding between |
| Environment | Injecting dependencies into view hierarchy |
| View Modifiers | Using |
| Migration Guide | Updating iOS 16 code to iOS 17+ |
| MVVM Observable | Setting up view model architecture |
| Navigation | Programmatic or deep-link navigation |
| Performance | Lists with 100+ items or excessive re-renders |
| UIKit Interop | Wrapping UIKit components (WKWebView, PHPicker) |
| Accessibility | VoiceOver, Dynamic Type, accessibility actions |
| Async Patterns | Loading states, refresh, background tasks |
| Composition | Reusable view modifiers or complex conditional UI |
@Bindable@Bindable@Bindable@ObservableNavigationPathnavigationDestination(for:destination:).task.task@EnvironmentUIViewRepresentableUIViewControllerRepresentable