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
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
420
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
A Harness for Behaviour: how to get AI to generate code that does what we intend, or "TDD in the age of AI"
xpmatteo
0
470
eBPF Can Do It! A 5-Minute Tour of 5 Real-World PHP Issues Solved with eBPF
egmc
0
300
イベントで大活躍する電子ペーパー名札 〜その3〜 / ビジュアルプログラミングIoTLT vol.23
you
PRO
0
160
RubyでRuby拡張を書いたらRubyより35倍速になったってどういうこと??
kazuho
3
660
Geek Woman の育ち方 〜コミュニティとAIと〜
chicaco
0
430
【ハノーバーメッセ振り返りイベントat名古屋】データは集約からAI起点の収集に ~組織内・組織間でのデータ連携~
tanakaseiya
0
130
はじめてのAI-DLC
yoshidashingo
2
590
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
270
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
330
LLM時代のリファクタリング戦略_AIエージェントによる段階的・安全なTS移行方法
play_inc
0
250
GitHub Copilot CLIでWebアクセシビリティを改善した話
tomokusaba
0
110
データ分析基盤の信頼を支える視点と設計
yuki_saito
1
720
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
140
HDC tutorial
michielstock
2
680
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Designing Experiences People Love
moore
143
24k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Ethics towards AI in product and experience design
skipperchong
2
290
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
130
The SEO identity crisis: Don't let AI make you average
varn
0
470
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Why Our Code Smells
bkeepers
PRO
340
58k
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