Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Easy Animation at Cocoaheads Copenhagen
Search
Marin Todorov
October 04, 2015
Technology
3
280
Easy Animation at Cocoaheads Copenhagen
Slides from the Easy Animation talk at Cocoaheads Copenhagen
Marin Todorov
October 04, 2015
Tweet
Share
More Decks by Marin Todorov
See All by Marin Todorov
Testing RxRealm with RxBlocking
icanzilb
0
510
RxSwift on iOS
icanzilb
4
4k
Is RxSwift for me? @ try! Swift NYC
icanzilb
3
23k
(Appbuilders) Non-technical ways to be a better developer
icanzilb
3
780
Non-technical ways to be a better developer
icanzilb
1
390
What's in it after the Indiepocalypse is over?
icanzilb
1
2.8k
Animations with Auto Layout
icanzilb
1
170
SpriteKit with Swift workshop
icanzilb
1
1k
Other Decks in Technology
See All in Technology
生成AIシステムとAIエージェントに関する性能や安全性の評価
shibuiwilliam
2
220
AI開発の定着を推進するために揃えるべき前提
suguruooki
1
400
一億総業務改善を支える社内AIエージェント基盤の要諦
yukukotani
1
670
GitHub を組織的に使いこなすために ソニーが実践した全社展開のプラクティス
sony
1
1.3k
ローカルVLM OCRモデル + Gemini 3.0 Proで日本語性能を試す
gotalab555
1
190
AI時代の戦略的アーキテクチャ 〜Adaptable AI をアーキテクチャで実現する〜 / Enabling Adaptable AI Through Strategic Architecture
bitkey
PRO
15
11k
AI エージェント活用のベストプラクティスと今後の課題
asei
2
380
スタートアップの事業成長を支えるアーキテクチャとエンジニアリング
doragt
1
8.6k
今すぐGoogle Antigravityを触りましょう
rfdnxbro
0
210
Master Dataグループ紹介資料
sansan33
PRO
1
4k
信頼性が求められる業務のAIAgentのアーキテクチャ設計の勘所と課題
miyatakoji
0
180
Data Hubグループ 紹介資料
sansan33
PRO
0
2.3k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1371
200k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
How GitHub (no longer) Works
holman
315
140k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Practical Orchestrator
shlominoach
190
11k
Building an army of robots
kneath
306
46k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
11
940
Testing 201, or: Great Expectations
jmmastey
46
7.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Transcript
Easy Animation Marin Todorov
Swift 2.0 Swift 2.0
None
Motivation
Motivation How would I improve the built-in animation APIs?
Goals * easier layer animations * easier animation sequences *
layer spring animations
David Rönnqvist post on objc.io
UIView.animateWithDuration(1.0, animations: { }) Create an animation context Destroy the
animation context Original animations block Animate layer properties
CALayer() UIView() layer layer view delegate
animations block view.alpha = 0.5 layer.position.y = 200 layer.cornerRadius =
50 UIView.actionForLayer(layer, “alpha”) CAAnimation UIView.actionForLayer(layer, “position.y”) CAAnimation UIView.actionForLayer(layer, “cornerRadius”) NSNull
layer.cornerRadius = 50 CABasicAnimation(keyPath: “cornerRadius”) toValue = 50 fromValue =
<current value>
Layer animations
Goals * easier layer animations * easier animation sequences *
layer spring animations
UIView.animationWithDuration(1.0, animations: { first animation }).animateWithDuration(1.0, { second animation })…
etc …
Sequence animations
Goals * easier layer animations * easier animation sequences *
layer spring animations
UIKit.animateWithDuration(…) CABasicAnimation UIKit.animateWithDuration(… springDamping: , springInitialVelocity: …) CASpringAnimation on iOS9
RBBSpringAnimation on iOS8
Feelings
Gotchas * Premature completion! * What is a damped harmonic
oscillator? * Retain/release #$!
What’s next? UIView.animateWithDuration(1.0, animations: { }) self.myButton.animationPath = CGPath(…) self.myButton.transform.scale.x
= 1.2 self.myButton.rotation = M_PI_4
How bout smth crazy? UIView.animateWithDuration(1.0, animations: { }) self.myButton.center.x =
20 Update the view constraints and thus make this work on AL? Whaaaa?
Marin Todorov Thank you! www.underplot.com