ios-swiftui-patterns
Installation
SKILL.md
iOS - SwiftUI Patterns
Modern declarative UI development for iOS, macOS, watchOS, and tvOS applications.
Key Concepts
State Management Hierarchy
SwiftUI provides a hierarchy of property wrappers for different state needs:
- @State: Local view state, owned by the view
- @Binding: Two-way connection to state owned elsewhere
- @StateObject: Creates and owns an ObservableObject
- @ObservedObject: References an ObservableObject owned elsewhere
- @EnvironmentObject: Dependency injection through the view hierarchy
- @Environment: Access to system-provided values