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
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
phperだってパンチカードでコーディングしたい
o0h
PRO
0
340
AWSに止められる覚悟してますか?
morizo_1984
2
540
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
golang-bob.pdf
iwatsukayura
0
130
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2.1k
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
For a Future-Friendly Web
brad_frost
184
10k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Paper Plane
katiecoart
PRO
5
54k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
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に変更