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
840
日常生活中的腦殘
haifengkao
0
280
機器學習超入門
haifengkao
0
170
宅宅設計入門2
haifengkao
2
300
宅宅設計入門
haifengkao
5
320
Other Decks in Programming
See All in Programming
Android端末で実現するオンデバイスLLM 2025
masayukisuda
1
170
アセットのコンパイルについて
ojun9
0
130
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
510
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
120
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
570
Improving my own Ruby thereafter
sisshiki1969
1
160
1から理解するWeb Push
dora1998
7
1.9k
速いWebフレームワークを作る
yusukebe
5
1.7k
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
710
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
3.4k
Reading Rails 1.0 Source Code
okuramasafumi
0
250
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Raft: Consensus for Rubyists
vanstee
140
7.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
113
20k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Building Applications with DynamoDB
mza
96
6.6k
The Art of Programming - Codeland 2020
erikaheidi
56
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
A designer walks into a library…
pauljervisheath
207
24k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
For a Future-Friendly Web
brad_frost
180
9.9k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
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/