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
520
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を正しく組み込むための アーキテクチャ── 国産LLMの現実と実践
kohju
1
260
「駆動」って言葉、なんかカッコイイ_Mitz
comucal
PRO
0
120
AWS re:Invent2025最新動向まとめ(NRIグループre:Cap 2025)
gamogamo
0
120
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
5
11k
[Neurogica] 採用ポジション/ Recruitment Position
neurogica
1
140
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
590
松尾研LLM講座2025 応用編Day3「軽量化」 講義資料
aratako
14
4.7k
MySQLとPostgreSQLのコレーション / Collation of MySQL and PostgreSQL
tmtms
1
1.4k
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
530
Snowflake導入から1年、LayerXのデータ活用の現在 / One Year into Snowflake: How LayerX Uses Data Today
civitaspo
0
2.6k
Introduce marp-ai-slide-generator
itarutomy
0
150
BidiAgent と Nova 2 Sonic から考える音声 AI について
yama3133
2
130
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
1
660
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
420
Designing for humans not robots
tammielis
254
26k
How to build a perfect <img>
jonoalderson
0
4.8k
So, you think you're a good person
axbom
PRO
0
1.9k
Git: the NoSQL Database
bkeepers
PRO
432
66k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
Paper Plane (Part 1)
katiecoart
PRO
0
2.4k
Scaling GitHub
holman
464
140k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
260
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