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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hai Feng Kao
March 27, 2018
Programming
460
1
Share
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
150
模組化的Swift架構(一) Redux入門
haifengkao
0
150
模組化的Swift架構(二) DDD速成
haifengkao
0
890
日常生活中的腦殘
haifengkao
0
280
機器學習超入門
haifengkao
0
180
宅宅設計入門2
haifengkao
2
310
宅宅設計入門
haifengkao
5
330
Other Decks in Programming
See All in Programming
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
260
10 Tips of AWS ~Gen AI on AWS~
licux
5
320
存在論的プログラミング: 時間と存在を記述する
koriym
5
860
KagglerがMixSeekを触ってみた
morim
0
370
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
1
280
AI-DLC Deep Dive
yuukiyo
5
1k
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
150
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
Java 21/25 Virtual Threads 소개
debop
0
340
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
550
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
2
570
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
120
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
570
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
270
Between Models and Reality
mayunak
3
260
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
710
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
160
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
720
Why Our Code Smells
bkeepers
PRO
340
58k
A Modern Web Designer's Workflow
chriscoyier
698
190k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
360
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/