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
470
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
180
模組化的Swift架構(一) Redux入門
haifengkao
0
160
模組化的Swift架構(二) DDD速成
haifengkao
0
910
日常生活中的腦殘
haifengkao
0
290
機器學習超入門
haifengkao
0
190
宅宅設計入門2
haifengkao
2
310
宅宅設計入門
haifengkao
5
330
Other Decks in Programming
See All in Programming
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
2
660
OSもどきOS
arkw
0
540
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
340
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
160
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
Oxlintのカスタムルールの現況
syumai
6
1.1k
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
110
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.4k
技術記事、 専門家としてのプログラマ、 言語化
mizchi
10
4k
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
780
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
250
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
22k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
470
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
970
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
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/