> 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)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/ios-ui-navigation?format=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
- Hardcoded Frames:
**No CGRect(x:y:w:h)**: Use Auto Layout. - Pyramid of Constraints:
**No complex constraint logic in VC**: Use UIStackView or custom views. - Missing Loading States:
**No Blank Screens**: Use skeleton views or UIActivityIndicatorView.
References
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)