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
UICollectionView自動布局
Search
Hai Feng Kao
March 27, 2018
Programming
1
440
UICollectionView自動布局
UICollectionView layout和self-sizing cell的介紹
Hai Feng Kao
March 27, 2018
Tweet
Share
More Decks by Hai Feng Kao
See All by Hai Feng Kao
iPlaygourd 2024
haifengkao
0
2
模組化的Swift架構(一) Redux入門
haifengkao
0
130
模組化的Swift架構(二) DDD速成
haifengkao
0
770
日常生活中的腦殘
haifengkao
0
270
機器學習超入門
haifengkao
0
170
宅宅設計入門2
haifengkao
2
280
宅宅設計入門
haifengkao
5
310
Other Decks in Programming
See All in Programming
カラム追加で増えるActiveRecordのメモリサイズ イメージできますか?
asayamakk
4
2k
ヤプリ新卒SREの オンボーディング
masaki12
0
110
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
550
Quine, Polyglot, 良いコード
qnighy
4
630
色々なIaCツールを実際に触って比較してみる
iriikeita
0
320
Click-free releases & the making of a CLI app
oheyadam
2
110
Amazon Qを使ってIaCを触ろう!
maruto
0
380
Tuning GraphQL on Rails
pyama86
2
1.2k
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
320
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
140
CSC509 Lecture 12
javiergs
PRO
0
140
CSC509 Lecture 11
javiergs
PRO
0
180
Featured
See All Featured
Building Adaptive Systems
keathley
38
2.3k
KATA
mclloyd
29
14k
Faster Mobile Websites
deanohume
305
30k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Designing for Performance
lara
604
68k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
2k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
It's Worth the Effort
3n
183
27k
The Language of Interfaces
destraynor
154
24k
Transcript
UICollectionView⾃自動布局 Hai Feng Kao
UICollectionViewLayout • collectionViewContentSize: • layoutAttributesForElements(in:): • layoutAttributesForItem(at:): • shouldInvalidateLayout(forBoundsChange:):
會⾃自⼰己調整⼤大⼩小的cell • layoutAttributesForElements(in:): • layoutAttributesForItem(at:): • cellForItemAt: • preferredLayoutAttributesFitting(_:) •
shouldInvalidateLayout(forPreferred LayoutAttributes: withOriginalAttributes) • invalidationContext(forPreferredLayo utAttributes: withOriginalAttributes)
Reference and images credit • http://martiancraft.com/blog/2017/05/collection-view- layouts/