Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

ios-animation-implementationiOS animation 实现

Agent Skill

用于辅助视频生成、动画合成、脚本化剪辑或 Remotion 等视频项目开发。它适合让 Agent 组织镜头、生成素材说明、维护合成代码或排查渲染问题。使用时需要确认分辨率、时长、素材路径和导出格式;涉及外部素材、人物肖像或商业发布时,应先核对版权授权和内容审核要求。

总安装

384

周安装

16

GitHub Stars

54

下载量

128
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ios-animation-implementation(iOS animation 实现)
来源仓库:https://github.com/existential-birds/beagle
仓库路径:skills/ios-animation-implementation
安装命令:
npx skills add https://github.com/existential-birds/beagle --skill ios-animation-implementation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/existential-birds/beagle --skill ios-animation-implementation

简介

ios-animation-implementation 用于编写基于 Apple 框架的原生动画代码。

  • 推荐直接使用 UIKit/SwiftUI 动画 API,而非第三方库以降低依赖风险。
  • 自动适配无障碍设置如 Reduce Motion 和 VoiceOver。
  • 实施前需检查系统是否已提供所需动效,避免重复开发。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

iOS Animation Implementation

Write animation code that uses Apple's frameworks directly. Third-party animation libraries add dependency risk and often lag behind new OS releases — Apple's APIs are well-optimized for the render pipeline and get free improvements with each iOS version.

Before Writing Custom Animation

Check whether the system already handles the motion you need. Apple's HIG: "Many system components automatically include motion, letting you offer familiar and consistent experiences throughout your app." System components also automatically adjust for accessibility settings and input methods — Liquid Glass (iOS 26) responds with greater emphasis to direct touch and produces subdued effects for trackpad. Custom animation can't match this adaptiveness for free, so prefer system-provided motion when it exists.

Skip custom animation when:

  • Standard navigation transitions cover your case (push, pop, sheet, fullScreenCover)
  • SF Symbol .symbolEffect provides the feedback you need
  • .contentTransition(.numericText) handles your data change
  • The system's default spring on withAnimation is sufficient

Write custom animation when:

  • The system doesn't provide the spatial relationship you need (hero transitions, custom gestures)
  • You need coordinated multi-property choreography
  • The animation is a signature moment that defines the app's identity
  • Gesture-driven interaction requires custom progress mapping

API Selection

Choose the right API for the job. Start with SwiftUI animations (simplest, most declarative), drop to UIKit when you need interactive control, and reach for Core Animation only when you need layer-level precision.

NeedAPIWhy
State-driven property changeswithAnimation / .animation(_:value:)Declarative, automatic interpolation
Multi-step sequenced animationPhaseAnimatorDiscrete phases with per-phase timing
Per-property timeline controlKeyframeAnimatorIndependent keyframe tracks per property
Hero transitions between viewsmatchedGeometryEffect + NamespaceGeometry matching across view identity
Navigation push/pop with zoom.navigationTransition(.zoom)iOS 18+ built-in zoom transition
Custom view insertion/removalTransition protocol conformanceTransitionPhase-based modifier
In-view content swap.contentTransition()Numeric text, interpolation, opacity
Scroll-position-based effects.scrollTransitionPhase-driven scroll-linked animation
SF Symbol animation.symbolEffect()Bounce, pulse, wiggle, breathe, rotate
Interactive/interruptible (UIKit)UIViewPropertyAnimatorPause, resume, reverse, scrub
Per-layer property animationCABasicAnimation / CASpringAnimationShadow, border, cornerRadius animation
Complex choreography (layers)CAKeyframeAnimation + CAAnimationGroupMulti-property layer animation
Physics simulationUIDynamicAnimatorGravity, collision, snap, attachment
Haptic feedback paired with animation.sensoryFeedback modifierTied to value changes
Animated background gradientsMeshGradient2D grid of positioned, animated colors

Implementation by Category

Detailed patterns and code examples live in the reference files. Load the one that matches your task:

TaskReference
SwiftUI declarative animations (withAnimation, springs, phase, keyframe)references/swiftui-animations.md
View transitions (navigation, modal, custom Transition protocol)references/transitions.md
Gesture-driven interactive animationsreferences/gesture-animations.md
Core Animation and UIKit animation patternsreferences/core-animation.md

When to Load References

  • Writing withAnimation, spring parameters, PhaseAnimator, or KeyframeAnimator → swiftui-animations.md
  • Building navigation transitions, modal presentations, matchedGeometryEffect, or custom Transition → transitions.md
  • Implementing drag-to-dismiss, swipe actions, pinch/rotate, or scroll-linked effects → gesture-animations.md
  • Working with CABasicAnimation, UIViewPropertyAnimator, layer animations, or bridging SwiftUI↔UIKit → core-animation.md

Spring Parameters Quick Reference

Springs are the default animation type in modern SwiftUI. Use duration and bounce — not mass/stiffness/damping unless bridging to UIKit/CA.

PresetDurationBounceUse Case
.smooth0.50.0Default transitions, most state changes
.snappy0.30.15Micro-interactions, toggles, quick feedback
.bouncy0.50.3Playful moments, attention-drawing
.interactiveSpring0.150.0Gesture tracking, drag following
Customvariesvaries.spring(duration: 0.4, bounce: 0.2)

Accessibility & Multimodal Feedback

Apple's HIG: "Make motion optional" and "supplement visual feedback by also using alternatives like haptics and audio to communicate." Every animation must handle Reduce Motion, and important state changes should use multiple feedback channels — not animation alone.

@Environment(\.accessibilityReduceMotion) private var reduceMotion

// Pattern 1: Conditional animation
withAnimation(reduceMotion ? .none : .spring()) {
    isExpanded.toggle()
}

// Pattern 2: Simplified alternative
.animation(reduceMotion ? .easeOut(duration: 0.15) : .spring(duration: 0.5, bounce: 0.3), value: isActive)

// Pattern 3: Skip entirely
if !reduceMotion {
    view.phaseAnimator(phases) { /* ... */ }
}

Reduce Motion fallback options (from most to least graceful):

  1. Crossfade — replace motion with opacity transition
  2. Shortened — same animation, much faster (0.1–0.15s), no bounce
  3. Instant.animation(.none) or skip the animation block entirely

Cancellation & Interruptibility

Apple's HIG: "Don't make people wait for an animation to complete before they can do anything, especially if they have to experience the animation more than once." Every animation must be interruptible.

  • Spring animations retarget automatically — this is the default and almost always what you want
  • For gesture-driven animations, the user is always in control — let them cancel mid-flight
  • For sequenced animations (KeyframeAnimator, PhaseAnimator with trigger), ensure the UI remains interactive during playback
  • Never disable user interaction during an animation unless there's a critical reason (e.g., destructive action confirmation)

Performance Checklist

  • Animate on the render server when possible — Core Animation runs off the main thread, SwiftUI's drawingGroup() moves rendering to Metal
  • Avoid animating view identity changes (.id() modifier) — this destroys and recreates the view
  • Use geometryGroup() when parent geometry changes cause child layout anomalies during animation
  • Provide explicit shadowPath when animating shadows — without it, the system recalculates the path every frame
  • In lists and scroll views, avoid per-item blur/shadow animations — these cause offscreen rendering for each cell
  • Keep PhaseAnimator and looping animations lightweight — they run continuously
  • For frequent interactions, prefer system-provided animation over custom motion — Apple's HIG: "generally avoid adding motion to UI interactions that occur frequently"
  • Profile with Instruments → "Animation Hitches" template to find frame drops

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.29%
按下载量换算48

Claude

28.17%
按下载量换算36

Cursor

21.54%
按下载量换算28

Gemini CLI

10.49%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills