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
470
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
UICollectionView自動布局
UICollectionView layout和self-sizing cell的介紹
Hai Feng Kao
March 27, 2018
More Decks by Hai Feng Kao
See All by Hai Feng Kao
物件導向的文藝復興:用DCI重塑程式設計的藝術
haifengkao
0
190
模組化的Swift架構(一) Redux入門
haifengkao
0
160
模組化的Swift架構(二) DDD速成
haifengkao
0
920
日常生活中的腦殘
haifengkao
0
290
機器學習超入門
haifengkao
0
190
宅宅設計入門2
haifengkao
2
310
宅宅設計入門
haifengkao
5
330
Other Decks in Programming
See All in Programming
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
980
メールのエイリアス機能を履き違えない
isshinfunada
0
250
Built Our Own Background Agent at LayerX
layerx
PRO
10
6k
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
200
What's New in Android 2026
veronikapj
0
270
プロポーザルを書いてもらう
pvcresin
0
570
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
1
130
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
400
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
240
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
260
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
120
Featured
See All Featured
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
390
Code Reviewing Like a Champion
maltzj
528
40k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
4 Signs Your Business is Dying
shpigford
187
23k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Making the Leap to Tech Lead
cromwellryan
135
10k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Designing for humans not robots
tammielis
254
26k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
480
Done Done
chrislema
186
16k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
470
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/