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
890
日常生活中的腦殘
haifengkao
0
280
機器學習超入門
haifengkao
0
180
宅宅設計入門2
haifengkao
2
300
宅宅設計入門
haifengkao
5
320
Other Decks in Programming
See All in Programming
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
2
390
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
990
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.4k
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
550
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
180
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
190
Codex の「自走力」を高める
yorifuji
0
1.2k
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
150
The free-lunch guide to idea circularity
hollycummins
0
240
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
360
[SF Ruby Feb'26] The Silicon Heel
palkan
0
110
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.2k
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
220
Designing for humans not robots
tammielis
254
26k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
75
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Invisible Side of Design
smashingmag
302
51k
We Have a Design System, Now What?
morganepeng
55
8k
The SEO identity crisis: Don't let AI make you average
varn
0
420
Measuring & Analyzing Core Web Vitals
bluesmoon
9
790
Practical Orchestrator
shlominoach
191
11k
Done Done
chrislema
186
16k
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/