Closed QuaRang1225 closed 2 months ago
//기존
//id를 배열에 저장해서 필터링하는 방식
fetchAlbumAssetQueue.async { [weak self] in
let items = assets.objects(at: IndexSet(integersIn: 0..<assets.count)).map{ $0.localIdentifier }
self?.mainQueue.async {
self?.items.append(contentsOf:items)
}
}
//수정
//앨범 선택 시 리스트 업데이트 하는 방식
fetchAlbumAssetQueue.async { [weak self] in
let items = assets.objects(at: IndexSet(integersIn: 0..<assets.count))
self?.mainQueue.async {
self?.items.append(contentsOf:items)
}
}
//기존
fetchResult.enumerateObjects { (asset, _, _) in
self?.mainQueue.async{
self?.assets.append(asset)
}
}
//수정
let items = assets.objects(at: IndexSet(integersIn: 0..<assets.count))
self?.mainQueue.async {
self?.assets = items
}