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
150
模組化的Swift架構(一) Redux入門
haifengkao
0
150
模組化的Swift架構(二) DDD速成
haifengkao
0
890
日常生活中的腦殘
haifengkao
0
280
機器學習超入門
haifengkao
0
180
宅宅設計入門2
haifengkao
2
310
宅宅設計入門
haifengkao
5
330
Other Decks in Programming
See All in Programming
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
130
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
260
3分でわかるatama plusのQA/about atama plus QA
atamaplus
0
140
AI-DLC Deep Dive
yuukiyo
5
960
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
190
Feature Toggle は捨てやすく使おう
gennei
0
570
安いハードウェアでVulkan
fadis
1
960
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
160
Nuxt Server Components
wattanx
0
270
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
260
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
1
530
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
700
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.2k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Building the Perfect Custom Keyboard
takai
2
730
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Evolving SEO for Evolving Search Engines
ryanjones
0
180
Building an army of robots
kneath
306
46k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Visualization
eitanlees
150
17k
Why Our Code Smells
bkeepers
PRO
340
58k
4 Signs Your Business is Dying
shpigford
187
22k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
880
How to train your dragon (web standard)
notwaldorf
97
6.6k
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/