Swiftui

Prisma-Labs-Dev/apple-skills/skills/swiftui

作者 Prisma-Labs-Dev498626005e65783ebe8570a103b2335cf397768c无许可证收录于 2026年10月9日更新于 2026年10月9日

API reference: SwiftUI. Query for views, layouts, navigation, @State/@Binding/@Observable, view modifiers, NavigationStack, iOS 26+ features.

AI 生成的概览

本地 SwiftUI API 参考,用于查询视图、布局、导航、状态包装器和修饰符。

功能
该技能为智能体提供一组本地存储的 Markdown 参考文件,涵盖 SwiftUI 的视图、布局、导航、属性包装器和视图修饰符等主题。智能体会在这些文件中检索相关主题,把概览文件当作文档路径索引,并在本地没有匹配内容时从外部 Markdown 镜像获取页面。它产出的是基于所引用文档的解答,而不是新的代码产物。
适用场景
当问题涉及 SwiftUI API 时使用,例如某个视图、布局、导航容器、状态包装器或修饰符的行为。适合在 iOS 或 Apple 平台开发过程中查阅文档。
运行要求
不附带脚本,仅包含说明和本地 Markdown 参考文件。只有在使用可选的 sosumi.ai Markdown 镜像回退获取时才需要网络访问。无需凭据或软件包。

SwiftUI Reference

This skill provides access to SwiftUI documentation via downloaded reference files.

Downloaded Reference Files

The following Apple documentation pages are available locally (grep-friendly):

FileContent
swiftui-overview.md [blocked]Full SwiftUI framework index (907KB)
view-protocol.md [blocked]View protocol and all modifiers (59KB)
state.md [blocked]@State property wrapper
binding.md [blocked]@Binding property wrapper
environment.md [blocked]@Environment property wrapper
observation.md [blocked]@Observable macro (iOS 17+)
navigationstack.md [blocked]NavigationStack (iOS 16+)
navigationsplitview.md [blocked]NavigationSplitView
tabview.md [blocked]TabView
list.md [blocked]List view
canvas.md [blocked]Canvas — immediate-mode drawing (iOS 15+)
graphicscontext.md [blocked]GraphicsContext — drawing API used inside Canvas

Fetching More Docs

  1. Search this skill's local .md files first.
  2. If the topic is not here, check the other installed Apple skills you have available by their names, descriptions, or SKILL.md frontmatter, then grep their local files. This is faster and uses less context than fetching new docs from the internet.
  3. If no installed skill has the page, use the relevant documentation path from swiftui-overview.md with the sosumi.ai Markdown mirror. For example, /documentation/swiftui/button maps to https://sosumi.ai/documentation/swiftui/button.

Common SwiftUI Doc Paths

TopicURL Path
Textswiftui/text
Buttonswiftui/button
Imageswiftui/image
VStackswiftui/vstack
HStackswiftui/hstack
ZStackswiftui/zstack
Formswiftui/form
Sheetswiftui/sheet
Alertswiftui/alert
Pickerswiftui/picker
Toggleswiftui/toggle
Sliderswiftui/slider
ProgressViewswiftui/progressview
AsyncImageswiftui/asyncimage
GeometryReaderswiftui/geometryreader
ScrollViewswiftui/scrollview
LazyVStackswiftui/lazyvstack
LazyHStackswiftui/lazyhstack
NavigationLinkswiftui/navigationlink
ToolbarItemswiftui/toolbaritem
Canvasswiftui/canvas
GraphicsContextswiftui/graphicscontext

Usage Instructions

  1. Check downloaded files first - Grep the local .md files for your topic
  2. Use the overview as an index - Search swiftui-overview.md for documentation paths
  3. Fetch only when needed - If no installed skill has the page, use sosumi.ai with documentation paths from the overview

Example workflow:

bash
# Looking for info on modifiers?grep -i "padding" view-protocol.md
# Need full Text documentation? Check the local file first.grep -i "font" text.md

Sources

来源与署名

来源:Prisma-Labs-Dev/apple-skills位于skills/swiftui提交4986260

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架