Agent-skills-standard ios-ui-navigation
Implement UIKit navigation, Auto Layout, and Apple Human Interface Guidelines in iOS. Use when implementing UIKit navigation, Auto Layout constraints, or HIG compliance. (triggers: **/*View.swift, **/*.xib, **/*.storyboard, NSLayoutConstraint, UIStackView, SnapKit, layoutSubviews)
install
source · Clone the upstream repo
git clone https://github.com/HoangNguyen0403/agent-skills-standard
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/HoangNguyen0403/agent-skills-standard "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ios/ios-ui-navigation" ~/.claude/skills/hoangnguyen0403-agent-skills-standard-ios-ui-navigation && rm -rf "$T"
manifest:
skills/ios/ios-ui-navigation/SKILL.mdsource content
iOS UI & Layout Standards
Priority: P0
Implementation Guidelines
Auto Layout
- Code-Based Layout: Prefer programmatic layout using
or SnapKit over Storyboards for better source control.NSLayoutAnchor - Safe Area: Always respect
.view.safeAreaLayoutGuide - UIStackView: Use for linear layouts to reduce constraint complexity.
UIKit Best Practices
- View Lifecycle: Perform layout adjustments in
orviewWillLayoutSubviews
.updateConstraints - Reusable Views: Extract complex UI into custom
subclasses.UIView - Image Optimization: Use SF Symbols for icons. Preferred vector (PDF/SVG) for custom assets.
- SwiftUI Bridge: Use
orUIViewRepresentable
to host UIKit in SwiftUI.UIViewControllerRepresentable
Human Interface Guidelines (HIG)
- Accessibility: Support Dynamic Type and provide meaningful
.accessibilityLabel - Feedback: Use
for haptic feedback on actions.UINotificationFeedbackGenerator - 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.