swiftui-documentation
SwiftUI official doc index — load when building SwiftUI views, modifiers, state management, data flow, AppKit bridging, or any SwiftUI behavior.
- License 许可
- MIT
- 最近更新
- 2026-10-25
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- swiftui-documentation
- metadata
- { "user-invocable": "false" }
- description
- SwiftUI official doc index — load when building SwiftUI views, modifiers, state management, data flow, AppKit bridging, or any SwiftUI behavior.
- allowed-tools
- WebFetch(domain:developer.apple.com)
03 SKILL.md 正文
SwiftUI Documentation Index
Fetch from this index before implementing any SwiftUI feature — do not guess at behavior. One URL per topic — read the most specific one first.
Discovery
https://developer.apple.com/documentation/swiftui— Main SwiftUI framework page; overview, all topic sections, and sample apps.
Core App Structure
https://developer.apple.com/documentation/swiftui/app-organization— Entry point and top-level app structure; theAppprotocol and scene composition.https://developer.apple.com/documentation/swiftui/app—Appprotocol: main entry point for a SwiftUI app (@main,bodyreturningsome Scene).https://developer.apple.com/documentation/swiftui/scenes— Scene types overview: life cycle, platform behavior, and built-in scene types.https://developer.apple.com/documentation/swiftui/scene—Sceneprotocol: root of a view hierarchy with system-managed life cycle.https://developer.apple.com/documentation/swiftui/scenebuilder—SceneBuilderresult builder: composing multiple scenes in an App body.
App Scenes
https://developer.apple.com/documentation/swiftui/windows— Window scenes:WindowGroup,Window, window styles, and multi-window behavior.https://developer.apple.com/documentation/swiftui/windowgroup—WindowGroupscene: multi-window support, platform-adaptive behavior.https://developer.apple.com/documentation/swiftui/window—Windowscene: single-instance auxiliary windows with an identifier.https://developer.apple.com/documentation/swiftui/settings—Settingsscene: macOS Settings window, auto-integrated with the app menu.https://developer.apple.com/documentation/swiftui/customizing-window-styles-and-state-restoration-behavior-in-macos— macOS window styling:windowStyle,defaultPosition, state restoration.
Data & State Management
https://developer.apple.com/documentation/swiftui/model-data— Overview of data flow tools:@State,@Binding,@Environment, and@Observable.https://developer.apple.com/documentation/swiftui/state—@Stateproperty wrapper: local transient UI state within a view.https://developer.apple.com/documentation/swiftui/binding—@Bindingproperty wrapper: two-way reference to a source of truth owned elsewhere.https://developer.apple.com/documentation/swiftui/environment—@Environmentproperty wrapper: reading observable objects andEnvironmentValuesfrom the environment.https://developer.apple.com/documentation/swiftui/environmentvalues—EnvironmentValuescollection: all built-in environment keys propagated through a view hierarchy.https://developer.apple.com/documentation/swiftui/bindable—@Bindableproperty wrapper: creates bindings to@Observablemodel properties in views.https://developer.apple.com/documentation/swiftui/appstorage—@AppStorageproperty wrapper: reads and writesUserDefaults, triggers view updates on change.https://developer.apple.com/documentation/observation/observable—@Observablemacro (Observation framework): reactive model objects that SwiftUI tracks for view updates.
Views — Fundamentals & Layout
https://developer.apple.com/documentation/swiftui/view-fundamentals— Overview of theViewprotocol, view hierarchy, and composition.https://developer.apple.com/documentation/swiftui/view—Viewprotocol: all required and optional modifiers,bodyproperty, and@ViewBuilder.https://developer.apple.com/documentation/swiftui/layout-fundamentals— Layout overview: stacks, grids, alignment, and spacing.https://developer.apple.com/documentation/swiftui/layout-adjustments— Fine-tuning layout: alignment, spacing, padding, and layout priority.https://developer.apple.com/documentation/swiftui/view-groupings— Purpose-driven containers:Form,Group,Section,GroupBox,ControlGroup,DisclosureGroup.https://developer.apple.com/documentation/swiftui/scroll-views—ScrollViewand scrolling behavior: axes, content insets, programmatic scrolling.https://developer.apple.com/documentation/swiftui/geometryreader—GeometryReader: reading container size and position for custom layout calculations.https://developer.apple.com/documentation/swiftui/custom-layout— Custom layout types:Layoutprotocol,AnyLayout, animated transitions between layouts.
Views — Controls & Display
https://developer.apple.com/documentation/swiftui/controls-and-indicators— Controls overview:Button,Toggle,Picker,Slider,Stepper,ProgressView.https://developer.apple.com/documentation/swiftui/text-input-and-output— Text display and input:Text,TextField,TextEditor,SecureField, formatting.https://developer.apple.com/documentation/swiftui/images—Imageand SF Symbols: system images, custom assets, resizable, rendering mode.https://developer.apple.com/documentation/swiftui/shapes— Built-in shapes:Circle,Rectangle,RoundedRectangle,Capsule,Ellipse,Path.https://developer.apple.com/documentation/swiftui/view-configuration— Configuring views:.disabled,.hidden,.tag,.id,.zIndex,.labelsHidden.
Presentation & Navigation
https://developer.apple.com/documentation/swiftui/modal-presentations— Modal presentation:.sheet,.alert,.confirmationDialog,.popover,.inspector.https://developer.apple.com/documentation/swiftui/navigation— Navigation overview:NavigationStack,NavigationSplitView,TabView.https://developer.apple.com/documentation/swiftui/navigationstack—NavigationStack: push/pop stack, navigation path, programmatic navigation.https://developer.apple.com/documentation/swiftui/tabview—TabView: tab bar with.tabItem, selection binding,.tabViewStyle.
Menus, Commands & Toolbars
https://developer.apple.com/documentation/swiftui/menus-and-commands— Menus and commands overview: menu bar, context menus,commands(content:).https://developer.apple.com/documentation/swiftui/menu—Menucontrol: hierarchical menus,Menunesting,Dividerseparators.https://developer.apple.com/documentation/swiftui/building-and-customizing-the-menu-bar-with-swiftui— macOS menu bar: building native menus with SwiftUI for iPadOS and macOS.https://developer.apple.com/documentation/swiftui/toolbars— Toolbar overview:ToolbarItem,ToolbarItemGroup,.toolbarmodifier, placement.
Event Handling
https://developer.apple.com/documentation/swiftui/gestures— Gesture overview:TapGesture,DragGesture,LongPressGesture, simultaneous and sequenced gestures.https://developer.apple.com/documentation/swiftui/input-events— Hardware input: keyboard events, key equivalents,KeyboardShortcut,onKeyPress.https://developer.apple.com/documentation/swiftui/focus— Focus management:@FocusState,.focused,.focusScope,.focusedValue,FocusedValues.https://developer.apple.com/documentation/swiftui/system-events— System event callbacks:onOpenURL,onContinueUserActivity,onNotification, scene phase.https://developer.apple.com/documentation/swiftui/drag-and-drop— Drag and drop:.draggable,.dropDestination, drag previews,Transferable.
AppKit Integration
https://developer.apple.com/documentation/swiftui/appkit-integration— AppKit bridging overview: hosting SwiftUI in AppKit, AppKit views in SwiftUI.https://developer.apple.com/documentation/swiftui/nsviewrepresentable—NSViewRepresentableprotocol: wrapping AppKit views for use in SwiftUI hierarchies.https://developer.apple.com/documentation/swiftui/nshostingcontroller—NSHostingController: AppKit view controller that hosts a SwiftUI view hierarchy.https://developer.apple.com/documentation/swiftui/nshostingview—NSHostingView: AppKit view that hosts a SwiftUI view hierarchy (without a controller).
Styling & Animation
https://developer.apple.com/documentation/swiftui/view-styles— View styles:.buttonStyle,.toggleStyle,.pickerStyle,.textFieldStyle,.labelStyle,.menuStyle,.progressViewStyle.https://developer.apple.com/documentation/swiftui/animations— Animation overview: implicit and explicit animations,withAnimation,Animationtype, timing curves.https://developer.apple.com/documentation/swiftui/animation—Animationtype:.easeInOut,.spring,.linear,repeatForever,speed.
Tool Support
https://developer.apple.com/documentation/swiftui/previews-in-xcode— Xcode previews:#Previewmacro,PreviewProvider, preview traits, variants.https://developer.apple.com/documentation/swiftui/performance-analysis— Performance: identifying slow updates,Self._printChanges, view identity and lifetime.
Accessibility
https://developer.apple.com/documentation/swiftui/accessibility-fundamentals— Accessibility:.accessibilityLabel,.accessibilityIdentifier,.accessibilityHint,.help,.disabled, dynamic type.
04 同仓库更多 Skills
workflow
Development workflow for this repo: plan → test → implement → human review → repeat. Load when starting any feature, bug fix, or refactor.
usernotifications-documentation
UserNotifications official doc index — load when building notification features, requesting authorization, scheduling local notifications, handling notification actions, or any UserNotifications framework behavior.
swiftui-macos-form-alignment
SwiftUI macOS Form layout: alignment override bug, background control, and VStack-based alternative. Load when debugging alignment issues inside Form rows, or when row controls (toggles, text fields, pickers) are visually misaligned with their labels on macOS.
swifterm-documentation
SwiftTerm official doc index — load when building SwiftTerm features, terminal emulation, terminal views, process lifecycle, delegate callbacks, GPU rendering, pseudo-terminals, or any SwiftTerm-specific behavior. Any project that uses or interacts with SwiftTerm should load this skill.
sqlite-documentation
SQLite official doc index — load when working with SQLite, the C/C++ API, import SQLite3, prepared statements, binding, query execution, result codes, or any SQLite-specific behavior. Any project that uses or interacts with SQLite should load this skill.
ship
Commit, push, ensure a PR exists, capture screenshots, and attach them to the PR.