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
420
Beyond REST: Web Services Designed for Mobile
skirchmeier
2
110
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
アクセス制御にまつわる改善 / Improving access control
itkq
0
590
IaCジェネレーターとBedrockで詳細設計書を生成してみた
tsukasa_ishimaru
4
890
今さら聞けないDocker入門 〜 Dockerfileのベストプラクティス編
devops_vtj
4
640
MapLibreとAmazon Location Service
dayjournal
1
190
Documentação de Produtos: Artefatos essenciais na prática
rigolon
1
100
[新卒向け研修資料] テスト文字列に「うんこ」と入れるな(2024年版)
infiniteloop_inc
5
18k
障害対応をちょっとずつよくしていくための 演習の作りかた
heleeen
1
1.7k
【SORACOM UG 東海】あらゆるモノがつながる社会へ、IoT と SORACOM
soracom
PRO
1
140
Grafana x PagerDuty Better Together
jacopen
1
260
チームでロジカルシンキングに改めて向き合っている話 〜学習環境と実践⽅法〜
sansantech
PRO
3
3.3k
認知症フレンドリーテックとスタックチャン
naokiuc
0
250
require(ESM)とECMAScript仕様
uhyo
4
980
Featured
See All Featured
Teambox: Starting and Learning
jrom
128
8.4k
For a Future-Friendly Web
brad_frost
172
9k
Why Our Code Smells
bkeepers
PRO
331
56k
Happy Clients
brianwarren
92
6.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
Designing the Hi-DPI Web
ddemaree
276
33k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
The Cost Of JavaScript in 2023
addyosmani
20
3.9k
Visualization
eitanlees
137
14k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Six Lessons from altMBA
skipperchong
22
3k
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