Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Fast scrolling in PreheaterController showing no images even images already downloaded #9

Closed
raviatri opened this issue Mar 10, 2017 · 4 comments

Comments

@raviatri
Copy link

Hi kean i am using UITableView as PreheaterController, and nuke to download images. Images are approximately 2 MB each. Issue is that after downloading all images if i am scrolling little bit fast (more then normal scrolling by a user) image view not showing respected image. Its working great on normal scrolling. Is it due to preheat method which call nuke to stopPreheatingImages ?

Thanks.

@kean
Copy link
Owner

kean commented Mar 10, 2017

Hey, I would suggest to remove the preheating and test your code without it first. If it still doesn't work, make sure that you're correctly using core APIs.

One of the common mistakes is to cancel requests in func tableView(_ tableView: UITableView, didEndDisplaying cell: UITableViewCell, forRowAt indexPath: IndexPath) method while starting the requests in override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell. Those two methods no longer balance each other out starting with iOS 10.

Also, check out preheating demo in Nuke's repo. It should be a good place to start.

@raviatri
Copy link
Author

hi Kean thanks for the reply i removed preheating and UITableView's didEndDisplaying method and used only Nuke ("imgView.nk_setImageWith(imageRequestWithURL(url))") to download images but this is not resolved issue.
Any suggestion ?

@kean
Copy link
Owner

kean commented Mar 14, 2017

I might have misunderstood the question. Does the images load eventually? Check out this other issue kean/Nuke#124, it seems related / same issue.

@raviatri
Copy link
Author

Images are loaded perfectly and at reuse time it took nano second to load in image view this may be because of image size ( 2.0 MB approx).
Yeah it seems same issue and i will try to use a thumbnail in place of large image.

And thank you so much for your help! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants