1 year ago

#389273

test-img

kuramura143

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

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!

ios

swift

uicollectionview

uicollectionviewcell

uicollectionviewdelegate

0 Answers

Your Answer

Accepted video resources