Swift UICollectionView jumps and stutters when loading images with kingfisher in CellForRowAt

334 views Asked by At

So I am loading in pictures related to posts for my new social app similar to IG, I am using kingfisher to load my images async.

The problem is when using the 'CellForRowAt' delegate method is that the image loading is jumpy and glitchy and the user never has a smooth scroll experience.

let imageURL = URL(string: "\(post.images.first?.imageUrl ?? "")\(post.images.first?.fileName ?? "")")
        currentCell.ImageViewContentIndicator.image = UIImage(systemName: "photo")
        currentCell.ImagePreviewForContent.kf.indicatorType = .activity
        **currentCell.ImagePreviewForContent.kf.setImage(with: imageURL)**
        

The thumbnails load in fine, it is more or less how they are being loaded in. If anyone has any experience with this sort of thing id be grateful to hear your tips!

0

There are 0 answers