UICollectionView — Александр Зимин
-
Upload
cocoaheads-moscow -
Category
Software
-
view
240 -
download
2
Transcript of UICollectionView — Александр Зимин
![Page 1: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/1.jpg)
UICollectionView
Зимин Александр iOS разработчик
UX дизайнер
![Page 2: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/2.jpg)
Что будет сегодня
2
![Page 3: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/3.jpg)
Что будет сегодня
2
• Что такое collection view
![Page 4: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/4.jpg)
Что будет сегодня
2
• Что такое collection view• Базовое устройство
![Page 5: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/5.jpg)
Что будет сегодня
2
• Что такое collection view• Базовое устройство• Ячейки
![Page 6: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/6.jpg)
Что будет сегодня
2
• Что такое collection view• Базовое устройство• Ячейки• Протоколы collection view
![Page 7: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/7.jpg)
Что будет сегодня
2
• Что такое collection view• Базовое устройство• Ячейки• Протоколы collection view• Layout у collection view
![Page 8: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/8.jpg)
Чего не будет
3
![Page 9: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/9.jpg)
Чего не будет
3
• Редактирование контента
![Page 10: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/10.jpg)
Чего не будет
3
• Редактирование контента• Смена layout у collection view
![Page 11: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/11.jpg)
Чего не будет
3
• Редактирование контента• Смена layout у collection view• Custom layout attributes
![Page 12: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/12.jpg)
Чего не будет
3
• Редактирование контента• Смена layout у collection view• Custom layout attributes• UIDynamics
![Page 13: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/13.jpg)
UICollectionView
44
![Page 14: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/14.jpg)
55
UICollectionView
![Page 15: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/15.jpg)
Основные понятия
6
![Page 16: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/16.jpg)
Основные понятия
6
• UICollectionView
![Page 17: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/17.jpg)
Основные понятия
6
• UICollectionView• UICollectionReusableView
![Page 18: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/18.jpg)
Основные понятия
6
• UICollectionView• UICollectionReusableView • UICollectionViewCell
![Page 19: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/19.jpg)
Основные понятия
6
• UICollectionView• UICollectionReusableView • UICollectionViewCell• Supplementary Views
![Page 20: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/20.jpg)
Основные понятия
6
• UICollectionView• UICollectionReusableView • UICollectionViewCell• Supplementary Views• Decoration View
![Page 21: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/21.jpg)
Основные понятия
6
• UICollectionView• UICollectionReusableView • UICollectionViewCell• Supplementary Views• Decoration View • UICollectionViewLayout
![Page 22: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/22.jpg)
Основные понятия
6
• UICollectionView• UICollectionReusableView • UICollectionViewCell• Supplementary Views• Decoration View • UICollectionViewLayout• UICollectionViewLayoutAttributes
![Page 23: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/23.jpg)
Основные понятия
6
• UICollectionView• UICollectionReusableView • UICollectionViewCell• Supplementary Views• Decoration View • UICollectionViewLayout• UICollectionViewLayoutAttributes• UICollectionViewFlowLayout
![Page 24: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/24.jpg)
Supplementary и Decoration view
7
![Page 25: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/25.jpg)
Supplementary и Decoration view
7
• Supplementary Views:
![Page 26: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/26.jpg)
Supplementary и Decoration view
7
• Supplementary Views:• Для презентации дополнительной информации
![Page 27: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/27.jpg)
Supplementary и Decoration view
7
• Supplementary Views:• Для презентации дополнительной информации• Некая аналогия header/footed view на table view
![Page 28: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/28.jpg)
Supplementary и Decoration view
7
• Supplementary Views:• Для презентации дополнительной информации• Некая аналогия header/footed view на table view• Имеют тип:
![Page 29: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/29.jpg)
Supplementary и Decoration view
7
• Supplementary Views:• Для презентации дополнительной информации• Некая аналогия header/footed view на table view• Имеют тип:
• UICollectionElementKindSectionHeader
![Page 30: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/30.jpg)
Supplementary и Decoration view
7
• Supplementary Views:• Для презентации дополнительной информации• Некая аналогия header/footed view на table view• Имеют тип:
• UICollectionElementKindSectionHeader• UICollectionElementKindSectionFooter
![Page 31: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/31.jpg)
Supplementary и Decoration view
7
• Supplementary Views:• Для презентации дополнительной информации• Некая аналогия header/footed view на table view• Имеют тип:
• UICollectionElementKindSectionHeader• UICollectionElementKindSectionFooter
• Decoration View:
![Page 32: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/32.jpg)
Supplementary и Decoration view
7
• Supplementary Views:• Для презентации дополнительной информации• Некая аналогия header/footed view на table view• Имеют тип:
• UICollectionElementKindSectionHeader• UICollectionElementKindSectionFooter
• Decoration View: • Используется для декораций
![Page 33: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/33.jpg)
Supplementary и Decoration view
7
• Supplementary Views:• Для презентации дополнительной информации• Некая аналогия header/footed view на table view• Имеют тип:
• UICollectionElementKindSectionHeader• UICollectionElementKindSectionFooter
• Decoration View: • Используется для декораций• Задается внутри layout у collection view
![Page 34: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/34.jpg)
Источник данных UICollectionViewDataSource
8
![Page 35: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/35.jpg)
Источник данных UICollectionViewDataSource
8
• Количество секций (О)
![Page 36: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/36.jpg)
Источник данных UICollectionViewDataSource
8
• Количество секций (О)• Количество элементов в секции
![Page 37: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/37.jpg)
Источник данных UICollectionViewDataSource
8
• Количество секций (О)• Количество элементов в секции• Ячейка для текущего элемента
![Page 38: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/38.jpg)
Источник данных UICollectionViewDataSource
8
• Количество секций (О)• Количество элементов в секции• Ячейка для текущего элемента• Дополнительный (supplementary) вид для текущего элемента (О)
![Page 39: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/39.jpg)
UICollectionReusableView
9
![Page 40: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/40.jpg)
UICollectionReusableView
9
• Метод переиспользования
![Page 41: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/41.jpg)
UICollectionReusableView
9
• Метод переиспользования• Идентификатор переиспользования
![Page 42: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/42.jpg)
UICollectionReusableView
9
• Метод переиспользования• Идентификатор переиспользования• Методы для layout
![Page 43: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/43.jpg)
UICollectionViewCell
10
NilNil
![Page 44: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/44.jpg)
UICollectionViewCell
11
![Page 45: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/45.jpg)
UICollectionViewCell
11
• var selected: Bool
![Page 46: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/46.jpg)
UICollectionViewCell
11
• var selected: Bool• var highlighted: Bool
![Page 47: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/47.jpg)
UICollectionViewDelegate
12
![Page 48: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/48.jpg)
UICollectionViewDelegate
12
• Методы выделения и нажатия на ячейки
![Page 49: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/49.jpg)
UICollectionViewDelegate
12
• Методы выделения и нажатия на ячейки• Методы отображения ячеек и дополнительных видов
![Page 50: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/50.jpg)
UICollectionViewDelegate
12
• Методы выделения и нажатия на ячейки• Методы отображения ячеек и дополнительных видов
• Методы вспомогательного меню
![Page 51: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/51.jpg)
UICollectionViewDelegate
12
• Методы выделения и нажатия на ячейки• Методы отображения ячеек и дополнительных видов
• Методы вспомогательного меню• Метод для смены layout у коллекции
![Page 52: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/52.jpg)
Layout
13
![Page 53: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/53.jpg)
Layout
13
• UICollectionViewDelegateFlowLayout
![Page 54: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/54.jpg)
Layout
13
• UICollectionViewDelegateFlowLayout• UICollectionViewLayout
![Page 55: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/55.jpg)
Layout
13
• UICollectionViewDelegateFlowLayout• UICollectionViewLayout• UICollectionViewFlowLayout
![Page 56: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/56.jpg)
Layout
14
![Page 57: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/57.jpg)
UICollectionViewDelegateFlowLayout
15
![Page 58: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/58.jpg)
UICollectionViewDelegateFlowLayout
15
• Имеет базовый набор методов выравнивания
![Page 59: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/59.jpg)
UICollectionViewDelegateFlowLayout
15
• Имеет базовый набор методов выравнивания• Размер ячейки
![Page 60: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/60.jpg)
UICollectionViewDelegateFlowLayout
15
• Имеет базовый набор методов выравнивания• Размер ячейки• Отступы для секции
![Page 61: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/61.jpg)
UICollectionViewDelegateFlowLayout
15
• Имеет базовый набор методов выравнивания• Размер ячейки• Отступы для секции• Минимальные отступы между ячейками
![Page 62: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/62.jpg)
UICollectionViewDelegateFlowLayout
15
• Имеет базовый набор методов выравнивания• Размер ячейки• Отступы для секции• Минимальные отступы между ячейками• Размер дополнительного вида
![Page 63: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/63.jpg)
Размер ячейки
16
![Page 64: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/64.jpg)
Отступы для секции
17
![Page 65: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/65.jpg)
Минимальные отступы между ячейками
18
![Page 66: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/66.jpg)
Custom layouts
19
![Page 67: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/67.jpg)
Custom layouts
19
• Процесс создания полностью своей логики расположения элементов
![Page 68: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/68.jpg)
Custom layouts
19
• Процесс создания полностью своей логики расположения элементов
• Свой размер collection view
![Page 69: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/69.jpg)
Custom layouts
19
• Процесс создания полностью своей логики расположения элементов
• Свой размер collection view• Может быть прокрутка в оба направления
![Page 70: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/70.jpg)
Custom layouts
19
• Процесс создания полностью своей логики расположения элементов
• Свой размер collection view• Может быть прокрутка в оба направления
• Внешнее представление каждого элемента задается через UICollectionViewLayoutAttributes
![Page 71: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/71.jpg)
Как это работает?
20
![Page 72: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/72.jpg)
Как это работает?
20
• Вызывается invalidateLayout()
![Page 73: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/73.jpg)
Как это работает?
20
• Вызывается invalidateLayout()• Срабатывает когда вы вызываете его руками или это делает collection view
![Page 74: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/74.jpg)
Как это работает?
20
• Вызывается invalidateLayout()• Срабатывает когда вы вызываете его руками или это делает collection view
• При срабатывании shouldInvalidateLayoutForBoundsChange()
![Page 75: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/75.jpg)
Как это работает?
20
• Вызывается invalidateLayout()• Срабатывает когда вы вызываете его руками или это делает collection view
• При срабатывании shouldInvalidateLayoutForBoundsChange()
• Вызывается prepareLayout()
![Page 76: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/76.jpg)
Как это работает?
20
• Вызывается invalidateLayout()• Срабатывает когда вы вызываете его руками или это делает collection view
• При срабатывании shouldInvalidateLayoutForBoundsChange()
• Вызывается prepareLayout()• Запрашивается размер поля
collectionViewContentSize
![Page 77: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/77.jpg)
Как это работает?
20
• Вызывается invalidateLayout()• Срабатывает когда вы вызываете его руками или это делает collection view
• При срабатывании shouldInvalidateLayoutForBoundsChange()
• Вызывается prepareLayout()• Запрашивается размер поля
collectionViewContentSize• Вызывается layoutAttributesForElementsInRect()
![Page 78: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/78.jpg)
Схема
21
![Page 79: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/79.jpg)
layoutAttributesForElementsInRect()
22
![Page 80: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/80.jpg)
layoutAttributesForElementsInRect()
22
• layoutAttributesForCellWithIndexPath:
![Page 81: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/81.jpg)
layoutAttributesForElementsInRect()
22
• layoutAttributesForCellWithIndexPath:• layoutAttributesForSupplementaryViewOfKind:withI
ndexPath:
![Page 82: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/82.jpg)
layoutAttributesForElementsInRect()
22
• layoutAttributesForCellWithIndexPath:• layoutAttributesForSupplementaryViewOfKind:withI
ndexPath:• layoutAttributesForDecorationViewOfKind:withInde
xPath:
![Page 83: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/83.jpg)
UICollectionViewLayoutAttributes
23
![Page 84: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/84.jpg)
UICollectionViewLayoutAttributes
23
• frame
![Page 85: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/85.jpg)
UICollectionViewLayoutAttributes
23
• frame• bounds
![Page 86: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/86.jpg)
UICollectionViewLayoutAttributes
23
• frame• bounds• center
![Page 87: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/87.jpg)
UICollectionViewLayoutAttributes
23
• frame• bounds• center• size
![Page 88: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/88.jpg)
UICollectionViewLayoutAttributes
23
• frame• bounds• center• size• transform3D
![Page 89: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/89.jpg)
UICollectionViewLayoutAttributes
23
• frame• bounds• center• size• transform3D• transform
![Page 90: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/90.jpg)
UICollectionViewLayoutAttributes
23
• frame• bounds• center• size• transform3D• transform• alpha
![Page 91: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/91.jpg)
UICollectionViewLayoutAttributes
23
• frame• bounds• center• size• transform3D• transform• alpha• zIndex
![Page 92: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/92.jpg)
UICollectionViewLayoutAttributes
23
• frame• bounds• center• size• transform3D• transform• alpha• zIndex• hidden
![Page 93: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/93.jpg)
Пару слов о редактировании
24
![Page 94: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/94.jpg)
Пару слов о редактировании
24
• initialLayoutAttributesForAppearingItemAtIndexPath
![Page 95: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/95.jpg)
Пару слов о редактировании
24
• initialLayoutAttributesForAppearingItemAtIndexPath• finalLayoutAttributesForDisappearingItemAtIndexPath
![Page 96: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/96.jpg)
Пару слов о редактировании
24
• initialLayoutAttributesForAppearingItemAtIndexPath• finalLayoutAttributesForDisappearingItemAtIndexPath• Такие же методы для Supplementary и Decoration
view
![Page 97: UICollectionView — Александр Зимин](https://reader033.fdocuments.in/reader033/viewer/2022050818/55aa760d1a28ab6d0d8b4604/html5/thumbnails/97.jpg)