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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ash Furrow
March 08, 2012
Programming
1
94
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
280
How Artsy Automates Team Culture
ashfurrow
0
3.3k
Building Custom TSLint Rules
ashfurrow
0
460
Circumventing Fear of the Unknown
ashfurrow
1
560
Building Better Software by Building Better Teams
ashfurrow
1
620
Building Open Source Communities
ashfurrow
0
930
Comparative Asynchronous Programming
ashfurrow
2
9.7k
Building Compassionate Software
ashfurrow
0
510
Swift, Briskly
ashfurrow
0
170
Other Decks in Programming
See All in Programming
OTP を自動で入力する裏技
megabitsenmzq
0
120
実践ハーネスエンジニアリング #MOSHTech
kajitack
2
850
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
140
Java 21/25 Virtual Threads 소개
debop
0
260
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
100
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
950
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
安いハードウェアでVulkan
fadis
1
760
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
150
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
170
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
210
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
68
38k
New Earth Scene 8
popppiees
1
1.8k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
400
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Side Projects
sachag
455
43k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
270
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
91
The Pragmatic Product Professional
lauravandoore
37
7.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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