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
460
1
Share
UICollectionView自動布局
UICollectionView layout和self-sizing cell的介紹
Hai Feng Kao
March 27, 2018
More Decks by Hai Feng Kao
See All by Hai Feng Kao
物件導向的文藝復興:用DCI重塑程式設計的藝術
haifengkao
0
170
模組化的Swift架構(一) Redux入門
haifengkao
0
160
模組化的Swift架構(二) DDD速成
haifengkao
0
900
日常生活中的腦殘
haifengkao
0
290
機器學習超入門
haifengkao
0
180
宅宅設計入門2
haifengkao
2
310
宅宅設計入門
haifengkao
5
330
Other Decks in Programming
See All in Programming
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
2
410
書き換えて学ぶTemporal #fukts
pirosikick
2
390
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
3
240
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
1
170
tsserverとは何だったのか_これからどうなるのか
nowaki28
1
310
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
980
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
2.2k
空間オーディオの活用
objectiveaudio
0
160
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
4
510
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
530
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
170
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
510
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
290
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
330
Typedesign – Prime Four
hannesfritz
42
3k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
Discover your Explorer Soul
emna__ayadi
2
1.1k
A Soul's Torment
seathinner
6
2.8k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Thoughts on Productivity
jonyablonski
76
5.2k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Abbi's Birthday
coloredviolet
2
7.6k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
180
Measuring & Analyzing Core Web Vitals
bluesmoon
9
830
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/