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
120
模組化的Swift架構(一) Redux入門
haifengkao
0
140
模組化的Swift架構(二) DDD速成
haifengkao
0
850
日常生活中的腦殘
haifengkao
0
280
機器學習超入門
haifengkao
0
170
宅宅設計入門2
haifengkao
2
300
宅宅設計入門
haifengkao
5
320
Other Decks in Programming
See All in Programming
Introduce Hono CLI
yusukebe
6
2.7k
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
500
Leading Effective Engineering Teams in the AI Era
addyosmani
7
460
Le côté obscur des IA génératives
pascallemerrer
0
150
What's new in Spring Modulith?
olivergierke
1
160
品質ワークショップをやってみた
nealle
0
510
Railsだからできる 例外業務に禍根を残さない 設定設計パターン
ei_ei_eiichi
0
930
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
250
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
550
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
110
CSC509 Lecture 06
javiergs
PRO
0
260
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
200
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
Speed Design
sergeychernyshev
32
1.2k
How GitHub (no longer) Works
holman
315
140k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Automating Front-end Workflow
addyosmani
1371
200k
Scaling GitHub
holman
463
140k
Become a Pro
speakerdeck
PRO
29
5.6k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Six Lessons from altMBA
skipperchong
29
4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
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/