Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Working With Scroll Views
Search
Ash Furrow
March 08, 2012
Programming
100
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Working With Scroll Views
Ash Furrow
March 08, 2012
More Decks by Ash Furrow
See All by Ash Furrow
My Slow Return to a Swift Career
ashfurrow
0
25
Migrating to React Native: A Long-Term Retrospective
ashfurrow
0
340
How Artsy Automates Team Culture
ashfurrow
0
3.4k
Building Custom TSLint Rules
ashfurrow
0
530
Circumventing Fear of the Unknown
ashfurrow
1
600
Building Better Software by Building Better Teams
ashfurrow
1
700
Building Open Source Communities
ashfurrow
0
1k
Comparative Asynchronous Programming
ashfurrow
2
9.8k
Building Compassionate Software
ashfurrow
0
580
Other Decks in Programming
See All in Programming
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
730
XHTMLが残したもの
yosuke_furukawa
PRO
2
830
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
180
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
160
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
260
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
160
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.8k
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.6k
The Rails Doctrine Decade
koic
2
170
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
180
Intent as Code
shoppingjaws
6
1k
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
Accessibility Awareness
sabderemane
1
210
How to Ace a Technical Interview
jacobian
281
24k
How to build a perfect <img>
jonoalderson
1
6k
RailsConf 2023
tenderlove
30
1.6k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Product Roadmaps are Hard
iamctodd
55
13k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Balancing Empowerment & Direction
lara
6
1.3k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
470
The Invisible Side of Design
smashingmag
301
52k
Transcript
Working with Scroll Views Ash Furrow Tuesday, 8 May, 12
What is a scroll view? • Subclass of UIView •
A view which scrolls • Sometimes zooms Tuesday, 8 May, 12
What is a scroll view? • Subclass of UIView •
A view which scrolls • Sometimes zooms UIView UIScrollView Tuesday, 8 May, 12
OK, what does “scroll” mean? • A container view that
lets its subviews move around • Maps • Home screen • Table view • Most things that move in iOS Tuesday, 8 May, 12
How to UIScrollView Tuesday, 8 May, 12
How to UIScrollView • Create scroll view, either in xib
or programmatically • Add subviews • ??? • Profit! Tuesday, 8 May, 12
How to UIScrollView • Create scroll view, either in xib
or programmatically • Add subviews • ??? • Profit! • ʵ Set contentSize Tuesday, 8 May, 12
contentSize • Defines the scrollable region • CGSize • Large
contentSize values don’t adversely affect performance Tuesday, 8 May, 12
contentInset Tuesday, 8 May, 12
contentOffset Tuesday, 8 May, 12
Demo: Basic Scroll View Tuesday, 8 May, 12
Scrolling • With Fingers! • Receive delegate callbacks (next slide)
• Programmatically • to top • to new contentOffset • to new rectangle Tuesday, 8 May, 12
Interesting Properties • delaysContentTouches • scrollview gesture recognizers • bounces
• alwaysBouncesVertical • alwaysBouncesHorizontal • scroll indicators (inset & style) • pagingEnabled Tuesday, 8 May, 12
Zooming • I am not an expert at zooming scroll
views • Different approaches • Watch the WWDC videos Tuesday, 8 May, 12
UIScrollViewDelegate • Tracking • Dragging • Decelerating • Zooming •
contentOffset change Tuesday, 8 May, 12
Demo: Paging Tuesday, 8 May, 12
YO, DAWG. I HEARD YOU LIKE SCROLLING. Tuesday, 8 May,
12
UITableViewDelegate • UITableView subclasses UIScrollView • Captures UIScrollViewDelegate callbacks Tuesday,
8 May, 12
Performance • UIScrollView Scales with subviews • Not with contentSize
• UIImage will kill your memory footprint Tuesday, 8 May, 12
Delegate flowcharts • UIScrollViewDelegate is simple • Implementing complex behaviour
with it is not Tuesday, 8 May, 12
Subclassing vs Delegation • Subclassing can break MVC • Better
for repeated behaviours • Delegation can get verbose • You’re writing Objective-C, live with it Tuesday, 8 May, 12
Demo: Reusing Subviews Tuesday, 8 May, 12
Demo: Infinite Scroll Tuesday, 8 May, 12
Ash Furrow
[email protected]
@ashfurrow Podcast: DashDashForce.me http://ashfurrow.com/ScrollViewMaterials.zip Tuesday, 8 May,
12