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
Facebook Pop
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ryan Nystrom
July 01, 2014
Programming
670
2
Share
Facebook Pop
A monthly Ray Wenderlich tech talk about Facebook Pop
Ryan Nystrom
July 01, 2014
More Decks by Ryan Nystrom
See All by Ryan Nystrom
Animation & Interaction Design
rnystrom
2
220
Facebook & Mobile
rnystrom
0
79
Drawing with Code
rnystrom
1
220
Open Source for the Open Mind
rnystrom
2
200
Mobile Debugging
rnystrom
0
110
Migrating to iOS 7
rnystrom
1
270
Minimal-first Design & Development
rnystrom
1
150
Learning iOS: Part 1
rnystrom
3
88
Other Decks in Programming
See All in Programming
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
5.3k
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
20k
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
170
Firefoxにコントリビューションして得られた学び
ken7253
2
160
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
430
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
GitHubCopilotCLIをはじめよう.pdf
htkym
0
330
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
460
PHPer、Cloudflare に引っ越す
suguruooki
2
190
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
400
Are We Really Coding 10× Faster with AI?
kohzas
0
170
Explore CoroutineScope
tomoeng11
0
190
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
360
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Deep Space Network (abreviated)
tonyrice
0
130
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
400
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
820
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Facilitating Awesome Meetings
lara
57
6.8k
BBQ
matthewcrist
89
10k
エンジニアに許された特別な時間の終わり
watany
106
240k
Transcript
Facebook Pop — @_ryannystrom
What is Pop? —Born from Facebook Paper —Library similar to
Core Animation —Delightful timing functions —Works on the model layer —NSObject & custom properties
Paper
Paper
Paper
Springs pre-iOS 7 [UIView animateWithDuration:0.2 animations:^{ view.frame = wayPastFrame; }
completion:^(BOOL finished) { [UIView animateWithDuration:0.2 animations:^{ view.frame = backABitFrame; } completion:^(BOOL finished) { [UIView animateWithDuration:0.2 animations:^{ view.frame = finalFrame; }]; }]; }];
Springs iOS 7 [UIView animateWithDuration:0.5 delay:0 usingSpringWithDamping:0.5 // 0.0-1.0 initialSpringVelocity:0.5
// 0.0-1.0 options:kNilOptions animations:^{ view.frame = frame; } completion:nil];
Springs with Pop POPSpringAnimation *spring = [POPSpringAnimation animationWithPropertyNamed:kPOPViewFrame]; spring.toValue =
[NSValue valueWithCGRect:frame]; spring.springBounciness = 15; spring.springSpeed = 20; [view pop_addAnimation:spring forKey:@"spring"];
Animate Autolayout with Pop POPSpringAnimation *spring = [POPSpringAnimation animationWithPropertyNamed:kPOPViewFrame]; spring.springBounciness
= 20; spring.springSpeed = 15; POPAnimatableProperty *property = [POPAnimatableProperty propertyWithName:@"propName" initializer:^(POPMutableAnimatableProperty *prop) { prop.readBlock = ^(NSLayoutConstraint *constraint, CGFloat values[]) { values[0] = constraint.constant; }; prop.writeBlock = ^(NSLayoutConstraint *constraint, const CGFloat values[]) { constraint.constant = values[0]; }; prop.threshold = 0.01; // "completeness" threshold }]; spring.property = property; spring.toValue = @(newWidth); [self.containerHeightConstraint pop_addAnimation:spring forKey:@"spring"];
Demo
Links https://github.com/schneiderandre/popping https://github.com/Ciechan/BCMeshTransformView http://codeplease.io/playing-with-pop-iv/ https://github.com/facebook/pop https://www.facebook.com/paper https://code.facebook.com/posts/234067533455773/introducing-pop-the-animation-engine-behind-paper/ http://blog.brianlovin.com/design-details-paper-by-facebook