Communitygithub.com

COTA-App/LandingPage

提供Apple人机界面指南中关于布局和导航组件的设计指导。当用户询问“侧边栏”、“分屏视图”、“标签栏”、“滚动视图”、“窗口设计”、“面板”、“列表视图”、“表格视图”、“列视图”、“大纲视图”、“导航结构”、“应用布局”、“盒子”、“装饰”或在Apple应用中层次化组织内容时,使用此技能。

LandingPage 是什么?

此技能旨在帮助开发者和AI代理理解并应用Apple人机界面指南(HIG)中关于布局与导航组件的核心原则。它根据用户的问题或描述,推荐合适的导航模式(如标签栏、侧边栏、分屏视图等),并指导如何在不同Apple平台(iOS、iPadOS、macOS、visionOS)上实现自适应布局。技能基于详细的参考文档(如侧边栏、列视图、分割视图等),并提供了导航模式选择指南和布局适配检查清单,以确保应用在不同屏幕尺寸和模式下(如iPad多任务)表现一致。输出格式清晰,包括推荐模式、布局层次、平台适配方案和尺寸类行为说明。

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

在你喜欢的 AI 中提问

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

文档

Apple HIG:布局与导航组件

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

关键原则

  1. 层次化组织。 将信息从广泛类别组织为具体细节。侧边栏用于顶层部分,列表用于可浏览项目,详细视图用于单个内容。

  2. 使用标准导航模式。 标签栏用于同级部分之间的扁平导航(iPhone)。侧边栏用于深层层次导航(iPad、Mac)。使模式与信息架构和平台匹配。

  3. 适应屏幕大小。 iPad上的三列布局在iPhone上折叠为单列。使用尺寸类和自适应API(NavigationSplitView)实现自动适配。

  4. 支持iPad多任务。 优雅响应分屏、侧拉和台前调度。在每个分割比例和尺寸类转换时进行测试。

  5. 在visionOS上保持空间一致性。 窗口、空间物体和装饰在共享空间中。可预测地定位。使用装饰作为工具栏和控件,而不遮挡内容。

  6. 对溢出内容使用滚动视图。 为离散内容单元启用分页。在适当位置支持下拉刷新。尊重安全区域。

  7. 保持导航可预测。 用户应始终知道他们在哪里、如何到达那里以及如何返回。使用返回按钮、面包屑和清晰的章节标题。

  8. 优先使用系统组件。 UINavigationController、UISplitViewController、NavigationSplitView 和 TabView 提供内置的自适应、无障碍和状态恢复。

参考索引

参考主题关键内容
sidebars.md侧边栏源列表、选择状态、可折叠部分、iPad/Mac模式
column-views.md列视图Finder风格浏览、通过列逐步展示
outline-views.md大纲视图可展开层次结构、展开三角形、树状结构
split-views.md分割视图两/三列布局、NavigationSplitView、自适应折叠
tab-views.md标签视图分段标签、页面样式标签、macOS标签分组
tab-bars.md标签栏底部标签栏(iOS)、徽章计数、最大标签数量
scroll-views.md滚动视图分页、滚动指示器、内容内边距、下拉刷新
windows.md窗口macOS/visionOS窗口管理、大小、全屏、恢复
panels.md面板检查器面板、工具面板、浮动面板、macOS约定
lists-and-tables.md列表和表格普通/分组/内嵌分组样式、滑动操作、节标题
boxes.md盒子内容分组容器、带标签的盒子、macOS分组
ornaments.md装饰visionOS工具栏附件、定位、可见性

导航模式选择

应用结构推荐模式平台适配
3-5个同级顶层部分标签栏iPhone:底部标签栏。iPad:侧边栏(.sidebarAdaptable,iPadOS 18+)。Mac:侧边栏或工具栏标签
深层层次内容侧边栏 + NavigationSplitViewiPhone:单列堆叠。iPad:两/三列。Mac:完整多列
深层文件/文件夹树列视图Mac:Finder风格。iPad:自适应。iPhone:推送导航
带详情的扁平列表分割视图(两列)iPhone:推送/弹出堆叠。iPad/Mac:主列 + 详细列
基于文档且带检查器窗口 + 面板Mac:主窗口带检查器。iPad:表单或弹出框
带工具的空间应用窗口 + 装饰visionOS:窗口上的装饰。其他平台:工具栏

布局适配检查清单

  • 紧凑宽度(iPhone竖屏): 导航折叠为单堆叠?标签栏可见?
  • 常规宽度(iPad横屏、Mac): 导航展开为侧边栏 + 详情?空间利用良好?
  • 多任务(iPad): 在每个分割比例下自适应?在侧拉中正常工作?
  • 无障碍: 支持所有大小的动态类型?VoiceOver顺序逻辑正确?
  • 方向: 内容在竖屏和横屏之间重新排列?
  • visionOS: 窗口符合人体工学定位?装饰可访问?深度有意义?

输出格式

  1. 推荐导航模式,并提供针对应用信息架构的理由。
  2. 布局层次,从根容器向下(例如,TabView > NavigationSplitView > List > Detail)。
  3. 平台适配,针对目标平台和尺寸类。
  4. 尺寸类行为,在每个转换点。

要问的问题

  1. 应用的信息架构是什么?(部分、层次深度、顶层类别?)
  2. 有多少个顶层部分?
  3. 目标平台有哪些?
  4. 需要在iPad上支持多任务?
  5. SwiftUI 还是 UIKit?

相关技能

  • hig-foundations —— 布局间距、边距、安全区域、对齐
  • hig-platforms —— 特定平台导航约定
  • hig-patterns —— 多任务、全屏和启动模式
  • hig-components-content —— 布局容器内显示的内容

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

Individual skills in this repo

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

COTA-App/LandingPage

>- Apple Human Interface Guidelines for content display components. Use this skill when the user asks about "charts component", "collection view", "image view", "web view", "color well", "image well", "activity view", "lockup", "data visualization", "content display", displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says "how should I display charts", "what's the best way to show images", "should I use a web view", "how do I build a grid of items", "what component shows media", or "how do I present a share sheet". Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.

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 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.

相关技能