Apple HIG: Presentation Components
Apple HIG:对话框和模态窗口
获取 Apple 人机界面指南中关于警报、工作表、弹出窗口和操作表的内容。为每个平台选择合适的模态模式,避免使用中断用户的对话框时的常见 UX 错误。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“Apple HIG: Presentation Components”。 Should I use an alert or action sheet for delete confirmation?
预期结果:
Use an action sheet on iPhone when there are multiple choices (Delete vs Save Draft). Use an alert when it's a simple confirmation with two buttons (Confirm Delete vs Cancel). The action sheet slides up from the bottom on iPhone, making it clear there are multiple options.
正在使用“Apple HIG: Presentation Components”。 How do I handle destructive actions in alerts?
预期结果:
Mark destructive buttons with red text using the destructive role. Place destructive buttons at the top where users are less likely to tap reflexively. Always include a Cancel button. Avoid making the destructive button the default.
正在使用“Apple HIG: Presentation Components”。 When should I use sheets instead of full-screen modals?
预期结果:
Use sheets for focused tasks that benefit from maintaining context with the underlying content. Sheets slide in from the edge (iOS) or attach to a window (macOS). Ideal for creating items, editing settings, or multi-step forms where seeing the parent content is helpful.
安全审计
安全All static findings are false positives. The skill contains Apple's Human Interface Guidelines documentation for UI presentation components. The flagged patterns (backticks, URLs, generic English words) are legitimate documentation elements, not security threats.
中风险问题 (1)
低风险问题 (2)
质量评分
你能构建什么
选择确认对话框类型
用户想要确认破坏性操作(删除、擦除、移除)。技能根据平台推荐使用警报或操作表,并提供按钮样式指导。
模态呈现决策
用户问'我应该使用工作表还是弹出窗口?'技能解释工作表何时更好地保持上下文,以及弹出窗口在 iPad/Mac 上的适用场景。
减少警报疲劳
用户抱怨应用中模态窗口过多。技能建议内联替代方案、撤销模式,以及何时避免中断用户。
试试这些提示
Should I use an alert or an action sheet for [use case]?
How does [component] behave differently on iPhone vs iPad?
What are the best practices for alert button labels and ordering?
What are alternatives to using a modal for [scenario]?
最佳实践
- Use alerts sparingly and only for critical situations requiring immediate attention
- Provide specific, actionable button labels (Delete, Save) instead of generic OK/Cancel
- Always include a Cancel button for destructive action confirmations
避免
- Using alerts for informative messages that could be shown inline
- Placing destructive actions as the default button
- Using the same component for all modal scenarios without considering alternatives