Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Physics-Based Interfaces with UIKit Dynamics
Sam Kirchmeier
March 20, 2014
Technology
0
99
Physics-Based Interfaces with UIKit Dynamics
Sam Kirchmeier
March 20, 2014
Tweet
Share
More Decks by Sam Kirchmeier
See All by Sam Kirchmeier
Exploring Stateless UIs in Swift
skirchmeier
2
330
Beyond REST: Web Services Designed for Mobile
skirchmeier
2
110
Auto Layout in iOS
skirchmeier
3
120
Bluetooth LE, Core Bluetooth, and a Glimpse Into Your Near Future
skirchmeier
0
240
Building HTML5 Tablet Apps
skirchmeier
2
490
iOS Training Part 2
skirchmeier
1
200
Custom iOS Controls
skirchmeier
3
170
Other Decks in Technology
See All in Technology
AWS re:Invent 2022で発表された新機能を試してみた ~Cloud OperationとSecurity~ / New Cloud Operation and Security Features Announced at AWS reInvent 2022
yuj1osm
1
210
「一通りできるようになった」その先の話
hitomi___kt
0
120
Cloudflare Workersで動くOG画像生成器
aiji42
1
490
NGINXENG JP#2 - 1-NGINX-エンジニアリング勉強会-きょうの見どころ
hiropo20
0
110
目指せCoverage100%! AutoScale環境におけるSavings Plans購入戦略 / JAWS-UG_SRE_Coverage
taishin
0
500
Kaggleシミュレーションコンペの動向
nagiss
0
270
ChatGPT for Hacking
anugrahsr
0
4.4k
スクラム導入して変わったチーム、組織のありかた
yumechi
0
190
OVN-Kubernetes-Introduction-ja-2023-01-27.pdf
orimanabu
1
370
【Λ(らむだ)】WinActorから始めるいつのまにリスキリング / WinAtorライトニングトーク大会20230123
lambda
0
100
証明書って何だっけ? 〜AWSの中間CA移行に備える〜
minorun365
3
2.1k
AI Builderについて
miyakemito
0
900
Featured
See All Featured
Writing Fast Ruby
sferik
613
58k
Designing for humans not robots
tammielis
245
24k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
2
400
A Philosophy of Restraint
colly
193
15k
Thoughts on Productivity
jonyablonski
49
2.7k
The Language of Interfaces
destraynor
149
21k
The Power of CSS Pseudo Elements
geoffreycrofte
52
4.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
317
22k
Keith and Marios Guide to Fast Websites
keithpitt
407
21k
Teambox: Starting and Learning
jrom
124
7.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
254
12k
Designing with Data
zakiwarfel
91
4.2k
Transcript
Physics-Based Interfaces with UIKit Dynamics Adam May @yammada ! Sam
Kirchmeier @skirchmeier
None
None
Agenda
Introduction ! ! !
Introduction Examples ! !
Introduction Examples Deconstruction !
Introduction Examples Deconstruction Collection Views
! Examples Deconstruction Collection Views Limitations & Gotchas Introduction
Introduction
Introduced with iOS 7 Not a separate framework – built
into UIKit Can be anywhere you're using UIKit
Another tool in your tool belt
Physics-Based Interfaces
Classical Mechanics
Classical mechanics is concerned with the set of physical laws
describing the motion of bodies under the action of a system of forces.
2014
2014 2007
None
None
None
None
2014 2007
2014 2007 1972
None
Pong: the original physics-based interface.
More Recent Examples
None
None
None
None
None
None
None
None
None
None
None
None
UIKit Dynamics
Natural, real-world interactions Without very much code Beautiful API Fun
Knowledge of physics not required
UIView
UIView UIDynamicAnimator Reference View
UIView UIDynamicAnimator Reference View UIGravityBehavior
UIView UIDynamicAnimator Reference View UIGravityBehavior UICollisionBehavior
None
UIDynamicItem Protocol !
UIDynamicItem Protocol UIView UICollectionViewLayoutAttributes
UIDynamicBehaviors
UIDynamicBehavior Base Class
UICollisionBehavior UIGravityBehavior ! ! !
UICollisionBehavior UIGravityBehavior UIAttachmentBehavior UIDynamicItemBehavior UIPushBehavior UISnapBehavior
Demo
Deconstruction
None
None
UICollisionBehavior UIGravityBehavior UIAttachmentBehavior UIDynamicItemBehavior UIPushBehavior UISnapBehavior
1. Create a UIDynamicAnimator. 2. Recognize a touch, and add
an attachment behavior. 3. Update the attachment’s anchor point during the gesture. 4. When the gesture ends, add a snap behavior or a push behavior.
1. Create a UIDynamicAnimator. 2. Recognize a touch, and add
an attachment behavior. 3. Update the attachment’s anchor point during the gesture. 4. When the gesture ends, add a snap behavior or a push behavior.
1. Create a UIDynamicAnimator. 2. Recognize a touch, and add
an attachment behavior. 3. Update the attachment’s anchor point during the gesture. 4. When the gesture ends, add a snap behavior or a push behavior.
1. Create a UIDynamicAnimator. 2. Recognize a touch, and add
an attachment behavior. 3. Update the attachment’s anchor point during the gesture. 4. When the gesture ends, add a snap behavior or a push behavior.
Demo
Collection Views
Gotchas
Only 2D Hard to visualize Weird units Everything’s a square
Not perfect for games
Recap
Introduced UIKit Dynamics PhotoFling Demo TweetBattle Demo Limitations & Gotchas
Thanks!
Discussion https://github.com/livefront/dynamics Adam May @yammada ! Sam Kirchmeier @skirchmeier