Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
AWS re:Invent 2025~初参加の成果と学び~
kubomasataka
1
190
マイクロサービスへの5年間 ぶっちゃけ何をしてどうなったか
joker1007
21
8.2k
"人"が頑張るAI駆動開発
yokomachi
1
540
Building Serverless AI Memory with Mastra × AWS
vvatanabe
0
590
ESXi のAIOps だ!2025冬
unnowataru
0
370
Bedrock AgentCore Evaluationsで学ぶLLM as a judge入門
shichijoyuhi
2
250
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
Amazon Quick Suite で始める手軽な AI エージェント
shimy
1
1.9k
さくらのクラウド開発ふりかえり2025
kazeburo
2
1.2k
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.9k
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
190
MySQLのSpatial(GIS)機能をもっと充実させたい ~ MyNA望年会2025LT
sakaik
0
120
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
53
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
200
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
110
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Code Review Best Practice
trishagee
74
19k
For a Future-Friendly Web
brad_frost
180
10k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
150
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
61
40k
Code Reviewing Like a Champion
maltzj
527
40k
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