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
Ryan Nystrom
July 01, 2014
Programming
2
650
Facebook Pop
A monthly Ray Wenderlich tech talk about Facebook Pop
Ryan Nystrom
July 01, 2014
Tweet
Share
More Decks by Ryan Nystrom
See All by Ryan Nystrom
Animation & Interaction Design
rnystrom
2
210
Facebook & Mobile
rnystrom
0
77
Drawing with Code
rnystrom
1
220
Open Source for the Open Mind
rnystrom
2
190
Mobile Debugging
rnystrom
0
110
Migrating to iOS 7
rnystrom
1
260
Minimal-first Design & Development
rnystrom
1
140
Learning iOS: Part 1
rnystrom
3
81
Other Decks in Programming
See All in Programming
Package Management Learnings from Homebrew
mikemcquaid
0
210
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
Patterns of Patterns
denyspoltorak
0
1.4k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
AI巻き込み型コードレビューのススメ
nealle
0
130
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
170
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
CSC307 Lecture 09
javiergs
PRO
1
830
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
CSC307 Lecture 04
javiergs
PRO
0
660
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
79
My Coaching Mixtape
mlcsv
0
46
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Mind Mapping
helmedeiros
PRO
0
78
Marketing to machines
jonoalderson
1
4.6k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
4 Signs Your Business is Dying
shpigford
187
22k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
63
Agile that works and the tools we love
rasmusluckow
331
21k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
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