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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hai Feng Kao
March 27, 2018
Programming
1
460
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
物件導向的文藝復興:用DCI重塑程式設計的藝術
haifengkao
0
150
模組化的Swift架構(一) Redux入門
haifengkao
0
150
模組化的Swift架構(二) DDD速成
haifengkao
0
880
日常生活中的腦殘
haifengkao
0
280
機器學習超入門
haifengkao
0
180
宅宅設計入門2
haifengkao
2
300
宅宅設計入門
haifengkao
5
320
Other Decks in Programming
See All in Programming
CSC307 Lecture 05
javiergs
PRO
0
500
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
740
dchart: charts from deck markup
ajstarks
3
1k
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.4k
Apache Iceberg V3 and migration to V3
tomtanaka
0
170
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
210
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.6k
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
410
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
ぼくの開発環境2026
yuzneri
0
240
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.6k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
780
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
A Modern Web Designer's Workflow
chriscoyier
698
190k
We Are The Robots
honzajavorek
0
170
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
240
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
54
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
260
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.7k
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/