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
500
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
Transcript
4 slides
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/
More Decks by Hai Feng Kao
See All by Hai Feng Kao
物件導向的文藝復興:用DCI重塑程式設計的藝術
haifengkao
0
220
模組化的Swift架構(一) Redux入門
haifengkao
0
190
模組化的Swift架構(二) DDD速成
haifengkao
0
970
日常生活中的腦殘
haifengkao
0
290
機器學習超入門
haifengkao
0
210
宅宅設計入門2
haifengkao
2
330
宅宅設計入門
haifengkao
5
360
Other Decks in Programming
See All in Programming
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
160
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
220
SODA - FACT BOOK(JP)
sodainc
1
40k
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
1
130
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
高速開発を止めずに 性能を上げる Flyleのシステム刷新と改善の歴史
azihsoyn
0
110
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
150
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
440
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
250
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
How to train your dragon (web standard)
notwaldorf
96
6.9k
The browser strikes back
jonoalderson
0
2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
530
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
560
Heart Work Chapter 1 - Part 1
lfama
PRO
11
37k