Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
UICollectionView自動布局
Search
Hai Feng Kao
March 27, 2018
Programming
490
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
200
模組化的Swift架構(一) Redux入門
haifengkao
0
170
模組化的Swift架構(二) DDD速成
haifengkao
0
940
日常生活中的腦殘
haifengkao
0
290
機器學習超入門
haifengkao
0
200
宅宅設計入門2
haifengkao
2
320
宅宅設計入門
haifengkao
5
350
Other Decks in Programming
See All in Programming
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.1k
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
200
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
650
カツオ、ご期待ください
suneo3476
0
180
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
980
golang-bob.pdf
iwatsukayura
0
130
APNsからLive Activityを開始する話
yumnumm
0
170
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
390
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
140
ChromeでローカルLLM
ryu1013
0
120
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.3k
ジョジョの世界をXRで再現する
mofurune
0
150
Featured
See All Featured
Designing for Performance
lara
612
70k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
It's Worth the Effort
3n
188
29k
Building an army of robots
kneath
307
47k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Everyday Curiosity
cassininazir
0
350
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Embracing the Ebb and Flow
colly
88
5.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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/