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
290
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
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
410
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
1.1k
Other Decks in Technology
See All in Technology
FastMCP OAuth Proxy with Cognito
hironobuiga
3
230
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
AI時代のシステム開発者の仕事_20260328
sengtor
0
320
The essence of decision-making lies in primary data
kaminashi
0
190
スケーリングを封じられたEC2を救いたい
senseofunity129
0
130
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
270
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
400
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
34
16k
GitHub Copilot CLI で Azure Portal to Bicep
tsubakimoto_s
0
300
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
3
1.1k
Cursor Subagentsはいいぞ
yug1224
2
130
遊びで始めたNew Relic MCP、気づいたらChatOpsなオブザーバビリティボットができてました/From New Relic MCP to a ChatOps Observability Bot
aeonpeople
1
130
Featured
See All Featured
Designing for Performance
lara
611
70k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Everyday Curiosity
cassininazir
0
180
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
250
AI: The stuff that nobody shows you
jnunemaker
PRO
4
500
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Automating Front-end Workflow
addyosmani
1370
200k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
440
Documentation Writing (for coders)
carmenintech
77
5.3k
Balancing Empowerment & Direction
lara
5
1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
230
Rails Girls Zürich Keynote
gr2m
96
14k
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