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
Ash Furrow
March 08, 2012
Programming
1
91
Working With Scroll Views
Ash Furrow
March 08, 2012
Tweet
Share
More Decks by Ash Furrow
See All by Ash Furrow
Migrating to React Native: A Long-Term Retrospective
ashfurrow
0
260
How Artsy Automates Team Culture
ashfurrow
0
3.3k
Building Custom TSLint Rules
ashfurrow
0
440
Circumventing Fear of the Unknown
ashfurrow
1
540
Building Better Software by Building Better Teams
ashfurrow
1
600
Building Open Source Communities
ashfurrow
0
900
Comparative Asynchronous Programming
ashfurrow
2
9.6k
Building Compassionate Software
ashfurrow
0
480
Swift, Briskly
ashfurrow
0
160
Other Decks in Programming
See All in Programming
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
250
CSC307 Lecture 02
javiergs
PRO
1
770
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2k
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.8k
ぼくの開発環境2026
yuzneri
0
110
Featured
See All Featured
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Building Applications with DynamoDB
mza
96
6.9k
Six Lessons from altMBA
skipperchong
29
4.1k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
A designer walks into a library…
pauljervisheath
210
24k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
How to train your dragon (web standard)
notwaldorf
97
6.5k
For a Future-Friendly Web
brad_frost
182
10k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Mind Mapping
helmedeiros
PRO
0
78
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