iOS 개발/DiffableDataSource

iOS 개발/DiffableDataSource

[DiffableDataSource] DiffableDataSource 사용법(1)

오늘은 간략한 예제와 함께 DiffableDataSource의 실제 사용법에 대해 살펴보는 시간을 갖겠다. Section, Item 클래스 생성하기 UICollectionViewDiffableDataSource는 Section identifier, Item identifier 이렇게 두 개의 generic 타입을 가진다. 우선 Section을 생성하겠다. 1. Section 생성하기 Section Type은 가변적이라면 Class 타입으로 생성하고, 고정된 섹션을 가진다면 enum 타입으로 생성해도 된다. class Section: Hashable{ let id = UUID() var title: String var people: [Person] init(title: String, people: [Per..

bamtorii
'iOS 개발/DiffableDataSource' 카테고리의 글 목록