I am trying following method to fetch asset from local identifier and displaying it in collection view but scroll become jerky while loading.
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "GridCell", for: indexPath) as! GridCell
cell.representedAssetIdentifier = "some uri"
let requestOptions = PHImageRequestOptions()
requestOptions.isSynchronous = false
let asset = PHAsset.fetchAssets(withLocalIdentifiers: ["some uri"!], options: .none).firstObject
imageManager.requestImage(for: asset!, targetSize: thumbnailSize, contentMode: .aspectFit, options: requestOptions, resultHandler: { result, info in
if cell.representedAssetIdentifier =="someuri" {
cell.imageview.image = result
}
})