Communitygithub.com

COTA-App/LandingPage

苹果人机界面指南中内容展示组件的说明。当用户询问图表、集合视图、图像视图、网页视图、颜色选取器、活动视图、锁屏或数据可视化等内容时使用此技能。

LandingPage 是什么?

该技能提供了基于苹果人机界面指南(HIG)的内容展示组件设计指导,适用于iOS、macOS、tvOS和visionOS等平台。它包含七个关键原则(如自适应布局、可访问性、性能优化等)和一份详细的参考索引,涵盖图表、集合视图、图像视图、颜色选取器、网页视图等组件。组件选择指南帮助开发者根据实际需求(如展示数据、浏览集合、显示图像等)推荐最佳内置组件,并说明平台差异。输出格式包括组件推荐理由、配置指导、可访问性要求和平台特定说明,确保应用遵循苹果设计规范。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/COTA-App/LandingPage/tree/HEAD/.claude/skills/hig-components-content

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Apple HIG:内容组件

在提问前检查 .claude/apple-design-context.md。尽量使用现有上下文,仅在未涵盖的信息时提问。

关键原则

  1. 适应不同尺寸和上下文。 内容组件必须能在不同屏幕尺寸、方向和分屏配置下工作。使用 Auto Layout 和尺寸类别。

  2. 确保内容可访问。 图表需要音频图形支持。图片需要替代文本。集合需要正确的 VoiceOver 导航顺序。所有内容组件都需要标签和描述。

  3. 维护视觉层次。 使用间距、大小和分组来建立清晰的信息层级。主要内容应视觉上突出。

  4. 优先使用系统组件。 在构建自定义组件前,先评估 UICollectionView、SwiftUI Charts、WKWebView。系统组件具有内置的可访问性和平台适配能力。

  5. 尊重平台惯例。 tvOS 上的集合使用带视差的大锁屏元素。相同集合在 iOS 上使用紧凑单元格和触摸目标。在 visionOS 上,内容获得深度和悬停效果。

  6. 处理空状态。 显示有意义的空状态,并指导如何填充内容,而非空白屏幕。

  7. 优化性能。 对大数据集使用懒加载、单元格复用、分页和预取。

参考索引

参考主题关键内容
charts.md图表Swift Charts、柱状/折线/面积/散点标记、图表可访问性、音频图形
collections.md集合网格/列表布局、组合布局、选择、重排序、差异化数据源
image-views.md图像视图宽高比处理、内容模式、SF Symbol 图像、可访问性
image-wells.md图像井拖放图像选择、macOS 专用、占位内容
color-wells.md颜色井颜色选择 UI、系统颜色选择器、自定义色彩空间
web-views.md网页视图WKWebView、SFSafariViewController、导航控制、内容限制
activity-views.md活动视图分享面板、活动项、自定义活动、操作扩展
lockups.md锁屏图像+文本元素、tvOS 卡片布局、聚焦效果、架子布局

组件选择指南

内容需求推荐组件平台说明
可视化定量数据图表(Swift Charts)iOS 16+、macOS 13+、watchOS 9+
浏览网格或列表项目集合视图组合布局用于复杂排列
显示单张图像图像视图支持宽高比适配;提供可访问性描述
通过拖拽或浏览选择图像图像井主要 macOS;iOS 上使用图像选择器
选择颜色颜色井触发系统颜色选择器;macOS、iOS 14+
内联显示网页内容网页视图(WKWebView)外部浏览使用 SFSafariViewController
共享内容到其他应用活动视图系统分享面板,可配置活动类型
内容卡片(图像+文本)锁屏主要 tvOS;可适配其他平台

输出格式

  1. 组件推荐及理由,引用相关 HIG 参考文件。
  2. 配置指导 -- 关键属性和设置。
  3. 推荐组件的可访问性要求。
  4. 针对目标平台的特定说明。

需要询问的问题

  1. 内容类型?(定量数据、图像、网页内容、可浏览集合、分享操作?)
  2. 目标平台?
  3. 静态还是动态内容?
  4. 内容量?(少量项目 vs 数百/数千项会影响组件选择和优化。)

相关技能

  • hig-foundations -- 颜色、排版、可访问性和图像指南
  • hig-patterns -- 数据可视化、分享和加载模式
  • hig-components-layout -- 承载内容的结构容器(滚动视图、列表、分屏视图)
  • hig-platforms -- 平台特定的组件行为(tvOS 上的锁屏、macOS 上的网页视图)

由 Raintree Technology 构建 · 更多开发者工具

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

COTA-App/LandingPage

>- Apple HIG guidance for selection and input controls including pickers, toggles, sliders, steppers, segmented controls, combo boxes, text fields, text views, labels, token fields, virtual keyboards, rating indicators, and gauges. Use this skill when the user says "picker or segmented control," "how should my form look," "what keyboard type should I use," "toggle vs checkbox," or asks about picker design, toggle, switch, slider, stepper, text field, text input, segmented control, combo box, label, token field, virtual keyboard, rating indicator, gauge, form design, input validation, or control state management. Cross-references: hig-components-menus, hig-components-dialogs, hig-components-search.

COTA-App/LandingPage

>- Apple Human Interface Guidelines for layout and navigation components. Use this skill when the user asks about "sidebar", "split view", "tab bar", "tab view", "scroll view", "window design", "panel", "list view", "table view", "column view", "outline view", "navigation structure", "app layout", "boxes", "ornaments", or organizing content hierarchically in Apple apps. Also use when the user says "how should I organize my app", "what navigation pattern should I use", "my layout breaks on iPad", "how do I build a sidebar", "should I use tabs or a sidebar", or "my app doesn't adapt to different screen sizes". Cross-references: hig-foundations for layout/spacing principles, hig-platforms for platform-specific navigation, hig-patterns for multitasking and full-screen, hig-components-content for content display.

COTA-App/LandingPage

>- Apple Human Interface Guidelines design foundations. Use this skill when the user asks about "HIG color", "Apple typography", "SF Symbols", "dark mode guidelines", "accessible design", "Apple design foundations", "app icon", "layout guidelines", "materials", "motion", "privacy", "right to left", "RTL", "inclusive design", branding, images, spatial layout, or writing style. Also use when the user says "my colors look wrong in dark mode", "what font should I use", "is my app accessible enough", "how do I support Dynamic Type", "what contrast ratio do I need", "how do I pick system colors", or "my icons don't match the system style". Cross-references: hig-platforms for platform-specific guidance, hig-patterns for interaction patterns, hig-components-layout for structural components, hig-components-content for display.

COTA-App/LandingPage

>- Apple Human Interface Guidelines interaction and UX patterns. Use this skill when the user asks about "onboarding flow", "user onboarding", "app launch", "loading state", "drag and drop", "search pattern", "settings design", "notifications", "modality", "multitasking", "feedback pattern", "haptics", "undo redo", "file management", data entry, sharing, collaboration, full screen, audio, video, haptic feedback, ratings, printing, help, or account management in Apple apps. Also use when the user says "how should onboarding work", "my app takes too long to load", "should I use a modal here", "how do I handle errors", "when should I ask for permissions", "how to show progress", or "what's the right way to confirm a delete". Cross-references: hig-foundations for underlying principles, hig-platforms for platform specifics, hig-components-layout for navigation, hig-components-content for data display.

相关技能