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
Working With Scroll Views
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ash Furrow
March 08, 2012
Programming
97
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
20
Migrating to React Native: A Long-Term Retrospective
ashfurrow
0
320
How Artsy Automates Team Culture
ashfurrow
0
3.4k
Building Custom TSLint Rules
ashfurrow
0
510
Circumventing Fear of the Unknown
ashfurrow
1
590
Building Better Software by Building Better Teams
ashfurrow
1
690
Building Open Source Communities
ashfurrow
0
1k
Comparative Asynchronous Programming
ashfurrow
2
9.8k
Building Compassionate Software
ashfurrow
0
570
Other Decks in Programming
See All in Programming
Go 1.27 における memory allocation の高速化
andpad
0
300
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
190
Cloudflare is Agents
chimame
0
180
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
7.4k
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
280
AIを紡ぐPMのお話
swdtkuy
0
120
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
170
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
270
Hono + Inertia + React で LP を構築した話
oukayuka
2
140
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
350
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
130
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
390
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
800
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Embracing the Ebb and Flow
colly
88
5.1k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
45k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
[SF Ruby Conf 2025] Rails X
palkan
2
1.3k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
500
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Making Projects Easy
brettharned
120
6.7k
ラッコキーワード サービス紹介資料
rakko
1
4.5M
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