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
290
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
530
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
790
Non-technical ways to be a better developer
icanzilb
1
400
What's in it after the Indiepocalypse is over?
icanzilb
1
2.8k
Animations with Auto Layout
icanzilb
1
180
SpriteKit with Swift workshop
icanzilb
1
1k
Other Decks in Technology
See All in Technology
新職業『オーケストレーター』誕生 — エージェント10体を同時に回すAgentOps
gunta
4
1.4k
GitLab Duo Agent Platform + Local LLMサービングで幸せになりたい
jyoshise
0
110
Oracle Cloud Infrastructure:2026年2月度サービス・アップデート
oracle4engineer
PRO
0
220
「データとの対話」の現在地と未来
kobakou
0
1.3k
「使いにくい」も「運用疲れ」も卒業する UIデザイナーとエンジニアが創る持続可能な内製開発
nrinetcom
PRO
1
780
ビズリーチにおける検索・推薦の取り組み / DEIM2026
visional_engineering_and_design
1
100
LINE Messengerの次世代ストレージ選定
lycorptech_jp
PRO
19
7.3k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
入門DBSC
ynojima
0
130
Lookerの最新バージョンv26.2がやばい話
waiwai2111
1
150
LINEアプリ開発のための Claude Code活用基盤の構築
lycorptech_jp
PRO
2
1.4k
生成AI活用によるPRレビュー改善の歩み
lycorptech_jp
PRO
5
2k
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
110
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
360
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
84
A Soul's Torment
seathinner
5
2.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
430
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
170
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