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
BrickView
Search
hirohisa
December 19, 2014
Programming
27
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
BrickView
https://github.com/hirohisa/BrickView
hirohisa
December 19, 2014
Other Decks in Programming
See All in Programming
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
280
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
ActionController meets Protocol Buffers
sorah
1
780
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
120
Next.js: The final boss of Web Performance
guaca
0
380
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
400
SODA - FACT BOOK(EN)
sodainc
1
200
Modernizing iOS Apps
seyfoyun
0
150
No More NoSuchMethodError
exoego
1
120
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
1
130
Featured
See All Featured
Claude Code のすすめ
schroneko
67
230k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Docker and Python
trallard
47
4.3k
Optimizing for Happiness
mojombo
378
71k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
350
Making the Leap to Tech Lead
cromwellryan
135
10k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
A designer walks into a library…
pauljervisheath
211
25k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Transcript
BrickView Hirohisa Kawasaki
index - どんなものか? - 似たUIを採用しているサービス - 実装経緯 - Spec /
Usage - まとめ
どんなものか? いくつかの列に高さの違うViewが、 レンガ積みのように綺麗に表示さ れる
似たUIを採用しているサービス - Pinterest - Etsy ... more
有名なモジュール - PSTCollectionView https://github.com/steipete/PSTCollectionView
実装した経緯 - 開発当時、iOS4.3+ - CollectionViewLayout の設定が大変、もっと簡 単にしたい - 似たモジュールは、バグがあったり使いにくい →
自分で作った方がカスタムしやすい 作ってみたい!
Spec - iOS 5.0+ - UIScrollView - BrickViewDelegate - BrickViewDataSource
- HeaderView - FooterView
Usage - properties, methods - padding 各Cell/View間のスペースの長さ - earlyScope 表示されていないCellを先読みする長さ
- reloadData Cell全てを再レンダリングする - updateData 表示が必要なCellをレンダリングする
BrickViewDelegate - include UIScrollViewDelegate UIScrollViewDelegateで使えるメソッドは全て使えます - (CGFloat)brickView:(BrickView *)brickView heightForCellAtIndex:(NSInteger)index 各Cellの高さを指定します
- (void)brickView:(BrickView *)brickView didSelectCell:(BrickViewCell *)cell AtIndex:(NSInteger) index Cellをタップした際に、呼ばれます - (void)brickView:(BrickView *)brickView didLongPressCell:(BrickViewCell *)cell AtIndex: (NSInteger)index Cellを長押しした際に、呼ばれます
BrickViewDataSource - (NSInteger)numberOfCellsInBrickView:(BrickView *)brickView 全てのCellがいくつあるのかを指定します - (NSInteger)numberOfColumnsInBrickView:(BrickView *)brickView 列の数を指定します -
(BrickViewCell *)brickView:(BrickView *)brickView cellAtIndex:(NSInteger)index Cellを返します、ここでCellに何を表示するかなどを指定します
まとめ - 複雑な位置調整のロジックを書かずに、使用す ることができます - reloadData / updateDataの切り分けにより、表 示コストを下げれます
今後 OSのベースのUIが変更されたので、iOS7.0+が標 準化されると思うので、以下を対応予定 - UICollectionViewへの切り替え - Swiftに変更