SwiftUI framework for building user interfaces
Use this skill when:
Complete SwiftUI framework documentation covering views, modifiers, layout, state management, animations, navigation, data flow, and all SwiftUI APIs for iOS, macOS, watchOS, tvOS, and visionOS.
AccessibilityTraitsAnimationAnyTransitionTransitionCapsuleCircleCommandsConfirmationDialogDisclosureGroupEllipseForEachFormFullScreenCoverGaugeGeometryProxyGeometryReaderGroupBoxImmersiveSpaceListMenuMenuBarExtraObservedObjectOutlineGroupPublishedRectangleRoundedRectangleSectionSecureFieldSwiftUIToolbarToolbarItemToolbarItemGroupDocumentGroupSceneSettingsWindowGroupButtonDatePickerPickerSliderStepperToggleFocusedSceneValuePreferenceKeyCanvasPathAppAppStorageDigitalCrownRotationalSensitivityDragGestureLongPressGestureMagnificationGestureRotationGestureTapGestureDividerGridGridRowHStackLazyHGridLazyHStackLazyVGridLazyVStackNavigationStackSpacerVStackZStackAlertLinkNavigationLinkNavigationPathPopoverSheetTableTableColumnWKInterfaceObjectRepresentableBindingEnvironmentEnvironmentObjectFocusStateObservableObservableObjectSceneStorageStateStateObjectAccessibilityLabelColorColorPickerContextMenuImageLabelNSViewControllerRepresentableNSViewRepresentablePreviewProviderProgressViewRealityViewScrollViewShapeTabViewTextTextEditorTextFieldTimelineViewUIViewControllerRepresentableUIViewRepresentableViewViewModifierAll models run entirely on-device, ensuring privacy and offline capability.
See the references/ directory for detailed API documentation organized by category:
references/accessibility.md - Accessibilityreferences/animations.md - Animationsreferences/api_reference.md - Api Referencereferences/app_structure.md - App Structurereferences/controls.md - Controlsreferences/data_flow.md - Data Flowreferences/drawing.md - Drawingreferences/essentials.md - Essentialsreferences/gestures.md - Gesturesreferences/layout.md - Layoutreferences/navigation.md - Navigationreferences/state_management.md - State Managementreferences/view_modifiers.md - View Modifiers (18 modifiers including .sheet(), .frame(), .animation(), etc.)references/views.md - Viewslet model = SystemLanguageModel(useCase: .general)
let session = LanguageModelSession(model: model)
let response = try await session.respond(to: Prompt("Your question"))
struct Recipe: Generable {
let title: String
let ingredients: [String]
}
let recipe = try await session.respond(
generating: Recipe.self,
prompt: Prompt("Create a pasta recipe")
)
struct WeatherTool: Tool {
func call(arguments: String) async throws -> String {
// Fetch weather data
}
}
let session = LanguageModelSession(
model: model,
tools: [WeatherTool()]
)
For complete API details, see the categorized documentation in the references/ directory.