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
Session 223 - Enhancing User Experience with Sc...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
wwdcman
June 25, 2012
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Session 223 - Enhancing User Experience with Scroll Views
wwdcman
June 25, 2012
More Decks by wwdcman
See All by wwdcman
Session 409 - Learning Instruments
wwdcman
1
150
Session 412 - Debugging with Xcode
wwdcman
0
140
Session 404 - Building from the Command Line with Xcode
wwdcman
0
170
Session 306 - Integrating With Facebook, Twitter and Sina Weibo
wwdcman
0
220
Session 230 - Advanced Attributed Strings for iOS
wwdcman
0
100
Session 228 - Best Practices for Mastering Auto Layout
wwdcman
0
1.6k
Session 227 - Using iCloud with Core Data
wwdcman
0
310
Session 226 - Core Text and Fonts
wwdcman
0
130
Session 225 - Up and Running: Making a Great Impression with Every Launch
wwdcman
0
140
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Leo the Paperboy
mayatellez
7
1.8k
KATA
mclloyd
PRO
35
15k
エンジニアに許された特別な時間の終わり
watany
107
250k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Facilitating Awesome Meetings
lara
57
7k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
730
Everyday Curiosity
cassininazir
0
230
Designing for humans not robots
tammielis
254
26k
Transcript
These are confidential sessions—please refrain from streaming, blogging, or taking
pictures Session 223 Enhancing User Experience with Scroll Views Josh Shaffer iOS Frameworks
Enhancing User Experience with Scroll Views
Enhancing User Experience with Scroll Views •UIScrollView configuration
Enhancing User Experience with Scroll Views •UIScrollView configuration •Improving paged
scrolling
Enhancing User Experience with Scroll Views •UIScrollView configuration •Improving paged
scrolling •Integrating with OpenGL
Enhancing User Experience with Scroll Views •UIScrollView configuration •Improving paged
scrolling •Integrating with OpenGL •Controlling stop offset
Review of the basics UIScrollView Configuration
Content Size
contentSize.height contentSize.width Content Size
320 Content Offset
Content Offset 320
Content Offset 320
Content Offset
View for Zooming in Scroll View
View for Zooming in Scroll View
Paged Scrolling
Paged Scrolling
View Configuration
View Configuration
View Configuration Paging UIScrollView
View Configuration Paging UIScrollView Zooming UIScrollViews
View Configuration Paging UIScrollView Zooming UIScrollViews UIImageViews
View Configuration Paging UIScrollView Zooming UIScrollViews UIImageViews UIPageViewController
View Configuration UIPageViewController Zooming UIScrollViews UIImageViews
Page Spacing
Page Spacing
Page Spacing UIPageViewControllerOptionInterPageSpacingKey
Page Spacing
Page Spacing
Paged Scrolling
Paged Scrolling
Paged Scrolling After view controller
Paged Scrolling
Paged Scrolling
Paged Scrolling Before view controller
Paged Scrolling
Zooming
Zooming
Paged Scrolling
Paged Scrolling
Demo Eliza Block
Integrating UIScrollView and OpenGL
None
None
None
None
None
None
None
None
None
None
UIScrollView
Demo Eliza Block
Common surprises Run Loop Modes
Common surprises Run Loop Modes [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(handleTimer:) userInfo:nil
repeats:NO];
Common surprises Run Loop Modes [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(handleTimer:) userInfo:nil
repeats:NO]; NSTimer *timer = [NSTimer timerWithInterval:1.0 target:self selector:@selector(handleTimer:) userInfo:nil repeats:NO];
Common surprises Run Loop Modes [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(handleTimer:) userInfo:nil
repeats:NO]; NSTimer *timer = [NSTimer timerWithInterval:1.0 target:self selector:@selector(handleTimer:) userInfo:nil repeats:NO]; [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSCommonRunLoopModes];
Common surprises Run Loop Modes
Common surprises Run Loop Modes [self performSelector:@selector(performDelayedWork) withObject:nil afterDelay:1.0];
Common surprises Run Loop Modes [self performSelector:@selector(performDelayedWork) withObject:nil afterDelay:1.0]; [self
performSelector:@selector(performDelayedWork) withObject:nil afterDelay:1.0 inModes:@[NSCommonRunLoopModes]];
UIResponder and Event Delivery
UIResponder and Event Delivery Parent View
UIResponder and Event Delivery Parent View Child View
UIResponder and Event Delivery Parent View Child View
UIResponder and Event Delivery Parent View Child View Child View
Parent View UIResponder and Event Delivery Parent View Child View
Child View
Parent View’s View Controller Parent View UIResponder and Event Delivery
Parent View Child View Child View
Window Parent View’s View Controller Parent View UIResponder and Event
Delivery Parent View Child View Child View
Application Window Parent View’s View Controller Parent View UIResponder and
Event Delivery Parent View Child View Child View
Application Delegate Application Window Parent View’s View Controller Parent View
UIResponder and Event Delivery Parent View Child View Child View
Application Delegate Application Window Parent View’s View Controller Parent View
UIResponder and Event Delivery Parent View Child View Child View
UIResponder and Event Delivery OpenGL View Scroll View
UIResponder and Event Delivery OpenGL View Scroll View
UIResponder and Event Delivery OpenGL View Scroll View Scroll View
Application Delegate Application Window OpenGL View’s View Controller OpenGL View
UIResponder and Event Delivery OpenGL View Scroll View Scroll View
Application Delegate Application Window OpenGL View’s View Controller OpenGL View
UIResponder and Event Delivery OpenGL View Scroll View Scroll View
How not to do it UIResponder and Event Delivery
How not to do it UIResponder and Event Delivery -
(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [[self nextResponder] touchesBegan:touches withEvent:event]; }
How not to do it UIResponder and Event Delivery -
(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [[self nextResponder] touchesBegan:touches withEvent:event]; }
How not to do it UIResponder and Event Delivery -
(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [[self nextResponder] touchesBegan:touches withEvent:event]; } Application Delegate Application Window OpenGL View’s View Controller OpenGL View Scroll View
Application Delegate Application Window OpenGL View’s View Controller OpenGL View
UIResponder and Event Delivery OpenGL View Scroll View Scroll View
Application Delegate Application Window OpenGL View’s View Controller OpenGL View
OpenGL View Scroll View Scroll View UIResponder and Event Delivery
Scroll View OpenGL View Application Delegate Application Window OpenGL View’s
View Controller OpenGL View Scroll View UIResponder and Event Delivery
Scroll View Application Delegate Application Window OpenGL View’s View Controller
OpenGL View Scroll View UIResponder and Event Delivery OpenGL View
Scroll View Application Delegate Application Window OpenGL View’s View Controller
OpenGL View Scroll View UIResponder and Event Delivery OpenGL View
Scroll View Application Delegate Application Window OpenGL View’s View Controller
OpenGL View UIResponder and Event Delivery OpenGL View
Scroll View Application Delegate Application Window OpenGL View’s View Controller
OpenGL View UIResponder and Event Delivery OpenGL View
Scroll View Application Delegate Application Window OpenGL View’s View Controller
OpenGL View UIResponder and Event Delivery OpenGL View Child View Child View
Scroll View Application Delegate Application Window OpenGL View’s View Controller
OpenGL View UIResponder and Event Delivery OpenGL View Child View Child View
Scroll View Application Delegate Application Window OpenGL View’s View Controller
OpenGL View UIResponder and Event Delivery OpenGL View Child View Child View
Demo Eliza Block
None
None
None
None
None
Deceleration Targets
Deceleration Targets - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
Deceleration Targets - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset {
*targetContentOffset = ClosestCarOffset(*targetContentOffset); }
Demo Eliza Block
Jake Behrens UI Frameworks Evangelist
[email protected]
Documentation Scroll View Programming
Guide for iOS http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/UIScrollView_pg Apple Developer Forums http://devforums.apple.com More Information
Introducing Collection Views Marina Thursday 9:00AM Related Sessions Building Advanced
Gesture Recognizers Marina Thursday 11:30AM
Scroll Views on iOS Lab Essentials Lab A Thursday 9:00AM
Labs
None
None
None
None