I have a UICollectionView am displaying images and gif files in Custom Collection cell. when I scroll the collection view the app crashed with this error log
viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
Note : It works fine when there is no gif files
and my code is
if indexPath.item == 0{
DispatchQueue.global(qos: DispatchQoS.QoSClass.default).async {
let testGifImage = UIImage.gifImageWithName("gifname")
DispatchQueue.main.sync {
cell.EmojiImage.image = testGifImage
}
}
return cell
}
else{
cell.imageView.image = UIImage(named: "imagename\(indexPath.item).jpg")
return cell
}