重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
swiftui-advanced by johnrogers/claude-swift-engineering
npx skills add https://github.com/johnrogers/claude-swift-engineering --skill swiftui-advanced广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
.simultaneously.sequenced.exclusivelyViewThatFitsAnyLayoutonGeometryChange手势组合顺序很重要 — .simultaneously 和 .sequenced 有不同的触发时机。交换它们会静默地改变行为。在使用前理解手势语义。
过度使用 ViewThatFits — ViewThatFits 在每次视图更改时都会重新测量。对于动画化的水平/垂直切换,请改用 AnyLayout。仅将 ViewThatFits 用于静态变体选择。
onGeometryChange 触发不必要的更新 — 读取几何信息会改变几何信息,从而触发更新,而更新又会改变几何信息……形成循环。仅在具备适当状态管理的情况下使用 .onGeometryChange,以避免循环。
项目中途出现架构不匹配 — 开始时使用 @Observable + State-as-Bridge,后来发现需要 TCA,代价高昂。根据复杂性预先选择架构(小型应用 = @Observable,复杂应用 = TCA)。
忽视视图 body 优化 — 在视图 body 中重复计算昂贵的计算会严重影响性能。将计算移至属性或模型中。在过早优化之前,先用 Instruments 26 进行分析。
每周安装次数
55
代码仓库
GitHub 星标数
180
首次出现
2026 年 1 月 23 日
安全审计
安装于
codex45
opencode44
claude-code43
gemini-cli40
github-copilot39
cursor37
Advanced SwiftUI patterns for gesture composition, adaptive layouts, architecture decisions, and performance optimization.
ALWAYS load reference files if there is even a small chance the content may be required. It's better to have the context than to miss a pattern or make a mistake.
| Reference | Load When |
|---|---|
| Gestures | Composing multiple gestures, GestureState, custom recognizers |
| Adaptive Layout | ViewThatFits, AnyLayout, size classes, iOS 26 free-form windows |
| Architecture | MVVM vs TCA decision, State-as-Bridge, property wrapper selection |
| Performance | Instruments 26, view body optimization, unnecessary updates |
.simultaneously.sequenced.exclusivelyViewThatFitsAnyLayoutonGeometryChangeGesture composition order matters — .simultaneously and .sequenced have different trigger timing. Swapping them silently changes behavior. Understand gesture semantics before using.
ViewThatFits over-used — ViewThatFits remeasures on every view change. For animated H/V switches, use AnyLayout instead. Use ViewThatFits only for static variant selection.
onGeometryChange triggering unnecessary updates — Reading geometry changes geometry, which triggers updates, which changes geometry... circular. Use .onGeometryChange only with proper state management to avoid loops.
Architecture mismatch mid-project — Starting with @Observable + State-as-Bridge then realizing you need TCA is expensive. Choose architecture upfront based on complexity (small app = @Observable, complex = TCA).
Ignoring view body optimization — Computing expensive calculations in view body repeatedly kills performance. Move calculations to properties or models. Profile with Instruments 26 before optimizing prematurely.
Weekly Installs
55
Repository
GitHub Stars
180
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex45
opencode44
claude-code43
gemini-cli40
github-copilot39
cursor37
TanStack Query v5 完全指南:React 数据管理、乐观更新、离线支持
2,500 周安装