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
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
SourceGeneratorのススメ
htkym
0
200
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
CSC307 Lecture 05
javiergs
PRO
0
500
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
220
Raku Raku Notion 20260128
hareyakayuruyaka
0
340
Apache Iceberg V3 and migration to V3
tomtanaka
0
170
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
200
ぼくの開発環境2026
yuzneri
0
240
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.5k
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
CSC307 Lecture 02
javiergs
PRO
1
780
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Designing Powerful Visuals for Engaging Learning
tmiket
0
240
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
150
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
78
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Between Models and Reality
mayunak
1
190
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
240
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/