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
Improving performance for UICollectionView in i...
Search
Bart den Hollander
November 15, 2016
Technology
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Improving performance for UICollectionView in iOS10
Slides of my talk at the DO-iOS 2016 conference including optimise drawing processing.
Bart den Hollander
November 15, 2016
Other Decks in Technology
See All in Technology
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1.1k
会社説明資料
persolserverworks
0
9.8k
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
380
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
130
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
180
How to Design Configuration for Rails Applications
willnet
1
780
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
130
大型犬好きによるPugの紹介
yamanoku
1
160
Optunaの最新リリースv5.0について
pfn
PRO
0
120
パッチ更新でterraform initが落ちた日
grimoh
1
140
Local CI × GitHub Actions
gogutan
2
190
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
100
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Utilizing Notion as your number one productivity tool
mfonobong
4
620
The Curse of the Amulet
leimatthew05
3
16k
Building an army of robots
kneath
307
47k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Transcript
Improving performance for UICollectionView in iOS10 Bart den Hollander
None
cell
None
None
None
None
None
None
None
NPO Stream • 11 tv channels • 576p resolution. No
HD.
<= iOS 9
!
iOS 10
"#
None
None
<= iOS 9 1 prepareForReuse
<= iOS 9 2 cellForItemAtIndexPath
<= iOS 9 willDisplayCell 3
iOS 10 3 willDisplayCell Visible <= iOS 9 iOS 10
<= iOS 9
<= iOS 9
<= iOS 9 didEndDisplayingCell 4
iOS 10 didEndDisplayingCell 4
iOS 10
iOS 10
Cell pre-fetching • Hint: cell coming up soon • UICollectionViewDataSourcePrefetching
New in iOS10
Cell pre-fetching func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) func
collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath]) New in iOS10
Cell pre-fetching class MinionsViewController: UICollectionViewController { override func viewDidLoad() {
super.viewDidLoad() collectionView.prefetchDataSource = self } } extension MinionsViewController: UICollectionViewDataSourcePrefetching { func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) { ImagePreloader.preloadImagesForIndexPath(indexPaths) } func collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath]) { ImagePreloader.cancelPreloadImagesForIndexPath(indexPaths) } } New in iOS10
class MinionsViewController: UICollectionViewController { override func viewDidLoad() { super.viewDidLoad() }
extension MinionsViewController: UICollectionViewDataSourcePrefetching { func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) { ImagePreloader.preloadImagesForIndexPath(indexPaths) } func collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath]) { ImagePreloader.cancelPreloadImagesForIndexPath(indexPaths) } } Cell pre-fetching collectionView.prefetchDataSource = self } New in iOS10
class MinionsViewController: UICollectionViewController { override func viewDidLoad() { super.viewDidLoad() collectionView.prefetchDataSource
= self } } func collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath]) { ImagePreloader.cancelPreloadImagesForIndexPath(indexPaths) } } Cell pre-fetching extension MinionsViewController: UICollectionViewDataSourcePrefetching { func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) { ImagePreloader.preloadImagesForIndexPath(indexPaths) } New in iOS10
func collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath]) { ImagePreloader.cancelPreloadImagesForIndexPath(indexPaths) }
class MinionsViewController: UICollectionViewController { override func viewDidLoad() { super.viewDidLoad() collectionView.prefetchDataSource = self } } extension MinionsViewController: UICollectionViewDataSourcePrefetching { func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) { ImagePreloader.preloadImagesForIndexPath(indexPaths) } } Cell pre-fetching New in iOS10
Cell pre-fetching • Also for UITableView via UITableViewDataSourcePrefetching New in
iOS10
Self Sizing Cells
Self Sizing Cells
Self Sizing Cells flowLayout.estimatedItemSize
Self Sizing Cells flowLayout.estimatedItemSize = CGSize(width: 50, height: 50)
Self Sizing Cells flowLayout.estimatedItemSize = UICollectionViewFlowLayoutAutomaticSize New in iOS10
Optimise drawing processing • Transparent assets and clearColor background •
Color Blending Layers
Optimise drawing processing
Optimise drawing processing
Optimise drawing processing
None
Interactive Reordering
Interactive Reordering Demo!
collectionView.isPagingEnabled = true Interactive Reordering
Thanks for watching! $% @hollanderbart hollanderbart