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
440
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
64
模組化的Swift架構(一) Redux入門
haifengkao
0
130
模組化的Swift架構(二) DDD速成
haifengkao
0
790
日常生活中的腦殘
haifengkao
0
270
機器學習超入門
haifengkao
0
170
宅宅設計入門2
haifengkao
2
280
宅宅設計入門
haifengkao
5
310
Other Decks in Programming
See All in Programming
SwiftUI Viewの責務分離
elmetal
PRO
1
220
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
240
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
GAEログのコスト削減
mot_techtalk
0
120
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
140
Introduction to kotlinx.rpc
arawn
0
670
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
1
180
GoとPHPのインターフェイスの違い
shimabox
2
170
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
1
140
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
950
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Music & Morning Musume
bryan
46
6.3k
Designing for Performance
lara
604
68k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
29
2.2k
YesSQL, Process and Tooling at Scale
rocio
171
14k
Adopting Sorbet at Scale
ufuk
74
9.2k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Writing Fast Ruby
sferik
628
61k
Unsuck your backbone
ammeep
669
57k
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/