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
450
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
110
模組化的Swift架構(一) Redux入門
haifengkao
0
140
模組化的Swift架構(二) DDD速成
haifengkao
0
840
日常生活中的腦殘
haifengkao
0
270
機器學習超入門
haifengkao
0
170
宅宅設計入門2
haifengkao
2
290
宅宅設計入門
haifengkao
5
310
Other Decks in Programming
See All in Programming
新世界の理解
koriym
0
140
Understanding Ruby Grammar Through Conflicts
yui_knk
1
120
令和最新版手のひらコンピュータ
koba789
14
8k
Claude Code と OpenAI o3 で メタデータ情報を作る
laket
0
140
AHC051解法紹介
eijirou
0
620
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
960
デザインシステムが必須の時代に
yosuke_furukawa
PRO
2
100
CSC305 Summer Lecture 05
javiergs
PRO
0
110
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
パスタの技術
yusukebe
1
400
decksh - a little language for decks
ajstarks
4
21k
ライブ配信サービスの インフラのジレンマ -マルチクラウドに至ったワケ-
mirrativ
2
260
Featured
See All Featured
Site-Speed That Sticks
csswizardry
10
780
A better future with KSS
kneath
239
17k
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
BBQ
matthewcrist
89
9.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Designing for Performance
lara
610
69k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
890
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
20k
Mobile First: as difficult as doing things right
swwweet
223
9.9k
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/