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
Physics-Based Interfaces with UIKit Dynamics
Search
Sam Kirchmeier
March 20, 2014
Technology
0
100
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
520
Beyond REST: Web Services Designed for Mobile
skirchmeier
2
120
Auto Layout in iOS
skirchmeier
3
130
Bluetooth LE, Core Bluetooth, and a Glimpse Into Your Near Future
skirchmeier
0
250
Building HTML5 Tablet Apps
skirchmeier
2
500
iOS Training Part 2
skirchmeier
1
200
Custom iOS Controls
skirchmeier
3
180
Other Decks in Technology
See All in Technology
君は隠しイベントを見つけれるか?
mujyun
0
310
マネジメント視点でのre:Invent参加 ~もしCEOがre:Inventに行ったら~
kojiasai
0
480
プロダクト成長に対応するプラットフォーム戦略:Authleteによる共通認証基盤の移行事例 / Building an authentication platform using Authlete and AWS
kakehashi
1
160
新R25、乃木坂46 Mobileなどのファンビジネスを支えるマルチテナンシーなプラットフォームの全体像 / cam-multi-cloud
cyberagentdevelopers
PRO
1
130
大規模データ基盤チームのオンプレTiDB運用への挑戦 / dpu-tidb
cyberagentdevelopers
PRO
1
110
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
290k
Vueで Webコンポーネントを作って Reactで使う / 20241030-cloudsign-vuefes_after_night
bengo4com
4
2.5k
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
180
Datachain会社紹介資料(2024年11月) / Company Deck
datachain
4
16k
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
170
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
220
Forget efficiency – Become more productive without the stress
ufried
0
150
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Writing Fast Ruby
sferik
626
61k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
For a Future-Friendly Web
brad_frost
175
9.4k
KATA
mclloyd
29
13k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Optimizing for Happiness
mojombo
376
69k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
RailsConf 2023
tenderlove
29
880
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