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
wwdcman
June 25, 2012
0
160
Session 223 - Enhancing User Experience with Scroll Views
wwdcman
June 25, 2012
Tweet
Share
More Decks by wwdcman
See All by wwdcman
Session 409 - Learning Instruments
wwdcman
1
130
Session 412 - Debugging with Xcode
wwdcman
0
110
Session 404 - Building from the Command Line with Xcode
wwdcman
0
140
Session 306 - Integrating With Facebook, Twitter and Sina Weibo
wwdcman
0
200
Session 230 - Advanced Attributed Strings for iOS
wwdcman
0
75
Session 228 - Best Practices for Mastering Auto Layout
wwdcman
0
1.5k
Session 227 - Using iCloud with Core Data
wwdcman
0
270
Session 226 - Core Text and Fonts
wwdcman
0
79
Session 225 - Up and Running: Making a Great Impression with Every Launch
wwdcman
0
100
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Building Applications with DynamoDB
mza
90
6.1k
Become a Pro
speakerdeck
PRO
24
5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
167
49k
A Philosophy of Restraint
colly
203
16k
Writing Fast Ruby
sferik
626
61k
Code Reviewing Like a Champion
maltzj
519
39k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
4
380
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Facilitating Awesome Meetings
lara
49
6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
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