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
310
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Easy Animation at Cocoaheads Copenhagen
Slides from the Easy Animation talk at Cocoaheads Copenhagen
Marin Todorov
October 04, 2015
More Decks by Marin Todorov
See All by Marin Todorov
Testing RxRealm with RxBlocking
icanzilb
0
550
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
810
Non-technical ways to be a better developer
icanzilb
1
430
What's in it after the Indiepocalypse is over?
icanzilb
1
2.8k
Animations with Auto Layout
icanzilb
1
190
SpriteKit with Swift workshop
icanzilb
1
1.1k
Other Decks in Technology
See All in Technology
AI時代におけるテストの基礎の再定義 / Rethinking the Fundamentals of Testing in the AI Era
mineo_matsuya
14
4.8k
Alphaモジュール使っていいのかい!?いけないのかい!?どっちなんだいっ!?
watany
1
320
大 AI 時代におけるC# の事情 ~ぶっちゃけトークを交えながら~
nenonaninu
1
130
そのドキュメント、自動化しませんか?
yuksew
1
420
なぜ、あなたのエージェントは言うことを聞かないのか
segavvy
1
380
Jitera Company Deck
jitera
0
280
ダッシュボード"開発"について 〜使われるダッシュボードのつくりかた〜
kimichan
0
200
Devsumi 2026 Summer 人もAIも使える共通基盤を事業の加速装置にする~デザインシステム運用に学ぶ組織レバレッジ~ 渡辺 凌央
legalontechnologies
PRO
1
290
『モデル + ハーネス』で読み解く AIエージェント入門
oracle4engineer
PRO
2
170
発表と総括 / Presentations and Summary
ks91
PRO
0
190
AI時代のPlaywright活用(システムテストを自動化する ー 実行エンジンにPla ywrightを選んだ理由)
ynisqa1988
2
950
クラウドを使う側から、作る側へ / 大吉祥寺.pm 2026前夜祭
fujiwara3
6
1.2k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
900
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Google's AI Overviews - The New Search
badams
0
1.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
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