AGENT SKILL
ios-ui-navigation
Standards for UIKit, Auto Layout, and Apple Human Interface Guidelines. Use when implementing UIKit navigation, Auto Layout constraints, or HIG compliance. (triggers: **/*View.swift, **/*.xib, **/*.storyboard, NSLayoutConstraint, UIStackView, SnapKit, layoutSubviews)
适用职业设计师
- License 许可
- MIT
- 最近更新
- 2026-06-24
- Stars
- ★ 66
- Forks
- 24
01 前言 Front Matter
- name
- ios-ui-navigation
- description
- Standards for UIKit, Auto Layout, and Apple Human Interface Guidelines. Use when implementing UIKit navigation, Auto Layout constraints, or HIG compliance. (triggers: **/*View.swift, **/*.xib, **/*.storyboard, NSLayoutConstraint, UIStackView, SnapKit, layoutSubviews)
02 资源文件 14
- 参考文档BENCHMARK.md3.9 KB
- 参考文档docs/failure-playbook.md10.8 KB
- 参考文档docs/platform-mapping.md2.6 KB
- 参考文档evals/evals.json1017 B
- 脚本linux/bashrc_hsb.sh3.0 KB
- 脚本linux/set-hsb-env.sh1.9 KB
- 参考文档references/phase-details.md55.6 KB
- 脚本scripts/hsb_phase_runner.sh847 B
- 参考文档skill-card.md4.1 KB
- 其他skill.oms.sig6.8 KB
- 脚本windows/Microsoft.PowerShell_profile.ps12.6 KB
- 参考文档windows/README-WINDOWS.md1.8 KB
- 其他windows/run-hsb.cmd345 B
- 脚本windows/set-hsb-env.ps11.6 KB
03 SKILL.md 正文
iOS UI & Layout Standards
Priority: P0
Implementation Guidelines
Auto Layout
- Code-Based Layout: Prefer programmatic layout using
NSLayoutAnchoror SnapKit over Storyboards for better source control. - Safe Area: Always respect
view.safeAreaLayoutGuide. - UIStackView: Use for linear layouts to reduce constraint complexity.
UIKit Best Practices
- View Lifecycle: Perform layout adjustments in
viewWillLayoutSubviewsorupdateConstraints. - Reusable Views: Extract complex UI into custom
UIViewsubclasses. - Image Optimization: Use SF Symbols for icons. Preferred vector (PDF/SVG) for custom assets.
- SwiftUI Bridge: Use
UIViewRepresentableorUIViewControllerRepresentableto host UIKit in SwiftUI.
Human Interface Guidelines (HIG)
- Accessibility: Support Dynamic Type and provide meaningful
accessibilityLabel. - Feedback: Use
UINotificationFeedbackGeneratorfor haptic feedback on actions. - Margins: Follow standard system margins (typically 16-20pt).
Anti-Patterns
- No CGRect(x:y:w:h): Use Auto Layout.
- No complex constraint logic in VC: Use UIStackView or custom views.
- No Blank Screens: Use skeleton views or UIActivityIndicatorView.