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
Transcript
24 slides
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
More Decks by Ash Furrow
See All by Ash Furrow
My Slow Return to a Swift Career
ashfurrow
0
47
Migrating to React Native: A Long-Term Retrospective
ashfurrow
0
380
How Artsy Automates Team Culture
ashfurrow
0
3.5k
Building Custom TSLint Rules
ashfurrow
0
550
Circumventing Fear of the Unknown
ashfurrow
1
640
Building Better Software by Building Better Teams
ashfurrow
1
750
Building Open Source Communities
ashfurrow
0
1.1k
Comparative Asynchronous Programming
ashfurrow
2
9.9k
Building Compassionate Software
ashfurrow
0
640
Other Decks in Programming
See All in Programming
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
260
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
500
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
110
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
230
AIコーディングをセッションで終わらせない: PHPライブラリ開発におけるコンテキスト承継設計
ickx
0
110
あなたはMCPの機能を、まだ知らない。
4geru
1
730
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
630
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
260
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
150
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
17
9.5k
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
210
Featured
See All Featured
Thoughts on Productivity
jonyablonski
76
5.5k
Typedesign – Prime Four
hannesfritz
42
3.2k
30 Presentation Tips
portentint
PRO
1
480
4 Signs Your Business is Dying
shpigford
187
23k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.9k
Evolving SEO for Evolving Search Engines
ryanjones
0
370
Practical Orchestrator
shlominoach
192
12k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
310
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
960
Optimising Largest Contentful Paint
csswizardry
37
4k
Rails Girls Zürich Keynote
gr2m
96
14k