본문 바로가기

WWDC7

다양한 셀을 그리는 DiffableDataSource 데이터 구성하기 #2 AnyModelStore의 필요성접근 문제 → 데이터 Collection 아이템 접근을 first로 한다. (순회 발생)var musicRegistration: UICollectionView.CellRegistration{ UICollectionView.CellRegistration { cell, indexPath, itemIdentifier in guard itemIdentifier.itemType == .music, let data:MusicItem = self.musicItems.first(where: {$0.id == itemIdentifier.id}) else {return} } }업데이트 문제 → 데이터 Collection .. 2023. 11. 10.
다양한 셀을 그리는 DiffableDataSource 데이터 구성하기 #1 기초 DiffableDataSource DiffableDataSource의 가장 큰 장점은 Snapshot을 이용해 수 많은 데이터 처리에 용이하다는 점이다. ⇒ 특히 렌더링 퍼포먼스를 애플이 최적화함 DiffableDataSource를 가장 쉽게 사용하는 방법은 다음과 같다. struct MusicItem:Identifiable,Hashable{ var id = UUID() var artist = "Newjeans" } struct ShortVideo:Identifiable,Hashable{ var id = UUID() var isLike = false var tictoker = "Leo" } struct VideoItem:Identifiable,Hashable{ var id = UUID() var y.. 2023. 11. 10.
Modern UIKit Collection, TableView #2-3 Advances in Collection View Layout #3 Advances in Collection View Layout - WWDC19 - Videos - Apple Developer Collection View Layouts make it easy to build rich interactive collections. Learn how to make dynamic and responsive layouts that range... developer.apple.com 💡 Collection View Layout을 사용하면 풍부한 interactive 컬렉션을 쉽게 만들 수 있습니다. 기본 목록부터 다차원 탐색 환경까지 동적이고 반응이 빠른 레이아웃을 만드는 방법을 알아보세요. Composition.. 2023. 9. 3.
Modern UIKit Collection, TableView #2-2 Advances in Collection View Layout #2 Advances in Collection View Layout - WWDC19 - Videos - Apple Developer Collection View Layouts make it easy to build rich interactive collections. Learn how to make dynamic and responsive layouts that range... developer.apple.com 💡 Collection View Layout을 사용하면 풍부한 interactive 컬렉션을 쉽게 만들 수 있습니다. 기본 목록부터 다차원 탐색 환경까지 동적이고 반응이 빠른 레이아웃을 만드는 방법을 알아보세요. Compositona.. 2023. 9. 3.