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
28
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
Transcript
12 slides
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に変更
Other Decks in Programming
See All in Programming
マルチプロダクトSaaSの アプリ一覧を速くする——複数プロダクトにまたがる「権限行脚」を減らすまで #techramen26conf
mktakuya
1
240
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
640
Getting Started with Vibe Coding
miccheng
0
250
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
610
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
Lean で手続き的プログラム の証明が書けるようになった
inoueasei
8
4.2k
Jujutsu で毎日のバージョン管理に「安心」と「直感性」を
oukayuka
0
110
Apache Airflow Introduction
leew
1
100
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
joyful-journey-spring-boot.pdf
hollycummins
0
130
はじめてのKubernetesコントリビューション
nasa9084
0
330
Spec-driven Development with AI
simas
PRO
0
2.3k
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
BBQ
matthewcrist
90
10k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Chasing Engaging Ingredients in Design
codingconduct
0
410
Done Done
chrislema
187
17k
Mind Mapping
helmedeiros
1
460
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
310
How to Think Like a Performance Engineer
csswizardry
28
3k
The Curse of the Amulet
leimatthew05
4
17k