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
420
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
模組化的Swift架構(一) Redux入門
haifengkao
0
120
模組化的Swift架構(二) DDD速成
haifengkao
0
710
日常生活中的腦殘
haifengkao
0
260
機器學習超入門
haifengkao
0
160
宅宅設計入門2
haifengkao
2
250
宅宅設計入門
haifengkao
5
300
Other Decks in Programming
See All in Programming
Ruby GitHub Packages
bkuhlmann
0
620
入門 AWS Amplify Gen2 / Introduction to AWS Amplify Gen2
genkiogasawara
1
310
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
ログラスを支える設計標準について / loglass-design-standards
urmot
10
2.1k
App Router への移行は「改善」となり得るのか?/ Can migration to App Router be an improvement
takefumiyoshii
8
2.1k
Git Lint
bkuhlmann
4
740
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
370
Folding Cheat Sheet #1
philipschwarz
PRO
0
210
GitHub Actionsで泣かないためにやっておきたい設定 / Recommended GHA settings to avoid crying
pinkumohikan
3
490
Front-end application development, Symfony-style(s)
dunglas
2
1.9k
pixivアプリでマルチモジュールを実現するまで
gatosyocora
1
130
SwiftUI Performance 不要なViewの再描画と更新を抑える
bigamitiongit
1
160
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
216
8.6k
Teambox: Starting and Learning
jrom
128
8.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
76
41k
Thoughts on Productivity
jonyablonski
57
3.8k
Building Flexible Design Systems
yeseniaperezcruz
318
37k
A better future with KSS
kneath
231
16k
Atom: Resistance is Futile
akmur
258
25k
What's in a price? How to price your products and services
michaelherold
237
11k
How to train your dragon (web standard)
notwaldorf
72
5.1k
4 Signs Your Business is Dying
shpigford
175
21k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
Rails Girls Zürich Keynote
gr2m
91
13k
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/