首页/移动开发/ios-application-dev
I

ios-application-dev

by @minimax-aiv1.0.0
4.6(6)

使用UIKit、SnapKit和SwiftUI构建iOS应用的实战指南,涵盖苹果平台最佳实践和设计模式

ios-developmentswiftswiftuimobile-developmentuikitGitHub
安装方式
npx skills add minimax-ai/skills --skill ios-application-dev
compare_arrows

Before / After 效果对比

1
使用前

新手开发者需要查阅大量文档和教程,学习UIKit布局、导航控制器、状态管理等知识,上手一个完整iOS应用需要数周时间

使用后

提供经过验证的UIKit/SwiftUI代码模式、SnapKit布局示例、最佳实践和常见架构,快速搭建TabBar、导航、列表等核心功能

description SKILL.md

ios-application-dev

iOS Application Development Guide

A practical guide for building iOS applications using UIKit, SnapKit, and SwiftUI. Focuses on proven patterns and Apple platform conventions.

Quick Reference

UIKit

Purpose Component

Main sections UITabBarController

Drill-down UINavigationController

Focused task Sheet presentation

Critical choice UIAlertController

Secondary actions UIContextMenuInteraction

List content UICollectionView + DiffableDataSource

Sectioned list DiffableDataSource + headerMode

Grid layout UICollectionViewCompositionalLayout

Search UISearchController

Share UIActivityViewController

Location (once) CLLocationButton

Feedback UIImpactFeedbackGenerator

Linear layout UIStackView

Custom shapes CAShapeLayer + UIBezierPath

Gradients CAGradientLayer

Modern buttons UIButton.Configuration

Dynamic text UIFontMetrics + preferredFont

Dark mode Semantic colors (.systemBackground, .label)

Permissions Contextual request + AVCaptureDevice

Lifecycle UIApplication notifications

SwiftUI

Purpose Component

Main sections TabView + tabItem

Drill-down NavigationStack + NavigationPath

Focused task .sheet + presentationDetents

Critical choice .alert

Secondary actions .contextMenu

List content List + .insetGrouped

Search .searchable

Share ShareLink

Location (once) LocationButton

Feedback UIImpactFeedbackGenerator

Progress (known) ProgressView(value:total:)

Progress (unknown) ProgressView()

Dynamic text .font(.body) semantic styles

Dark mode .primary, .secondary, Color(.systemBackground)

Scene lifecycle @Environment(\.scenePhase)

Reduce motion @Environment(\.accessibilityReduceMotion)

Dynamic type @Environment(\.dynamicTypeSize)

Core Principles

Layout

  • Touch targets >= 44pt

  • Content within safe areas (SwiftUI respects by default, use .ignoresSafeArea() only for backgrounds)

  • Use 8pt spacing increments (8, 16, 24, 32, 40, 48)

  • Primary actions in thumb zone

  • Support all screen sizes (iPhone SE 375pt to Pro Max 430pt)

Typography

  • UIKit: preferredFont(forTextStyle:) + adjustsFontForContentSizeCategory = true

  • SwiftUI: semantic text styles .headline, .body, .caption

  • Custom fonts: UIFontMetrics / Font.custom(_:size:relativeTo:)

  • Adapt layout at accessibility sizes (minimum 11pt)

Colors

  • Use semantic system colors (.systemBackground, .label, .primary, .secondary)

  • Asset catalog variants for custom colors (Any/Dark Appearance)

  • No color-only information (pair with icons or text)

  • Contrast ratio >= 4.5:1 for normal text, 3:1 for large text

Accessibility

  • Labels on icon buttons (.accessibilityLabel())

  • Reduce motion respected (@Environment(\.accessibilityReduceMotion))

  • Logical reading order (.accessibilitySortPriority())

  • Support Bold Text, Increase Contrast preferences

Navigation

  • Tab bar (3-5 sections) stays visible during navigation

  • Back swipe works (never override system gestures)

  • State preserved across tabs (@SceneStorage, @State)

  • Never use hamburger menus

Privacy & Permissions

  • Request permissions in context (not at launch)

  • Custom explanation before system dialog

  • Support Sign in with Apple

  • Respect ATT denial

Checklist

Layout

  • Touch targets >= 44pt

  • Content within safe areas

  • Primary actions in thumb zone (bottom half)

  • Flexible widths for all screen sizes (SE to Pro Max)

  • Spacing aligns to 8pt grid

Typography

  • Semantic text styles or UIFontMetrics-scaled custom fonts

  • Dynamic Type supported up to accessibility sizes

  • Layouts reflow at large sizes (no truncation)

  • Minimum text size 11pt

Colors

  • Semantic system colors or light/dark asset variants

  • Dark Mode is intentional (not just inverted)

  • No color-only information

  • Text contrast >= 4.5:1 (normal) / 3:1 (large)

  • Single accent color for interactive elements

Accessibility

  • VoiceOver labels on all interactive elements

  • Logical reading order

  • Bold Text preference respected

  • Reduce Motion disables decorative animations

  • All gestures have alternative access paths

Navigation

  • Tab bar for 3-5 top-level sections

  • No hamburger/drawer menus

  • Tab bar stays visible during navigation

  • Back swipe works throughout

  • State preserved across tabs

Components

  • Alerts for critical decisions only

  • Sheets have dismiss path (button and/or swipe)

  • List rows >= 44pt tall

  • Destructive buttons use .destructive role

Privacy

  • Permissions requested in context (not at launch)

  • Custom explanation before system permission dialog

  • Sign in with Apple offered with other providers

  • Basic features usable without account

  • ATT prompt shown if tracking, denial respected

System Integration

  • App handles interruptions gracefully (calls, background, Siri)

  • App content indexed for Spotlight

  • Share Sheet available for shareable content

References

Topic Reference

Touch Targets, Safe Area, CollectionView Layout System

TabBar, NavigationController, Modal Navigation Patterns

StackView, Button, Alert, Search, ContextMenu UIKit Components

CAShapeLayer, CAGradientLayer, Core Animation Graphics & Animation

Dynamic Type, Semantic Colors, VoiceOver Accessibility

Permissions, Location, Share, Lifecycle, Haptics System Integration

Metal Shaders & GPU Metal Shader Reference

SwiftUI HIG, Components, Patterns, Anti-Patterns SwiftUI Design Guidelines

Optionals, Protocols, async/await, ARC, Error Handling Swift Coding Standards

Swift, SwiftUI, UIKit, SF Symbols, Metal, and Apple are trademarks of Apple Inc. SnapKit is a trademark of its respective owners. Weekly Installs314Repositoryminimax-ai/skillsGitHub Stars7.3KFirst Seen11 days agoSecurity AuditsGen Agent Trust HubPassSocketPassSnykPassInstalled onopencode306codex304cursor302gemini-cli301github-copilot299kimi-cli298

forum用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价,来写第一条吧

统计数据

安装量200
评分4.6 / 5.0
版本1.0.0
更新日期2026年3月30日
对比案例1 组

用户评分

4.6(6)
5
0%
4
0%
3
0%
2
0%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code

时间线

创建2026年3月30日
最后更新2026年3月30日