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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Marin Todorov
October 04, 2015
Technology
300
3
Share
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
800
Non-technical ways to be a better developer
icanzilb
1
410
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
Google Cloud Next '26 の裏でこっそりリリースされたCloud Number Registry & Cloud Hub コスト分析 を試してみた
hikaru1001
0
150
自動テストだけで リリース判断できるチームへ - 鍵はテストの量ではなくリリース判断基準の再設計にあった / Redesigning Release Criteria for Lightweight Releases
ewa
7
3.2k
生成AIが変える SaaS の競争原理と弁護士ドットコムのプロダクト戦略
bengo4com
1
3.3k
Agent の「自由」と「安全」〜未来に向けて今できること〜
katayan
0
250
コミュニティ・勉強会を作るのは目的じゃない
ohmori_yusuke
0
280
Building a Study Buddy AI Agent from Scratch: From Passive Chatbots to Autonomous Systems
itchimonji
0
130
データ定義の混乱と戦う 〜 管理会計と財務会計 〜
wonohe
0
170
【技術書典20】OpenFOAM(自宅で深める流体解析)流れと熱移動(2)
kamakiri1225
0
360
ServiceNow Knowledge 26 の歩き方
manarobot
0
330
多角的な視点から見たAGI
terisuke
0
120
20260423_ハドソンのエロゲを追え_レトロゲーム
poropinai1966
0
110
AgentCore Managed Harness を使ってみよう
yakumo
2
310
Featured
See All Featured
Navigating Team Friction
lara
192
16k
Balancing Empowerment & Direction
lara
6
1.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
780
[SF Ruby Conf 2025] Rails X
palkan
2
1k
Designing for Timeless Needs
cassininazir
0
210
A Tale of Four Properties
chriscoyier
163
24k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
320
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
550
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