Answer the question
In order to leave comments, you need to log in
How to make a shared cache for webView and tableView?
There are two controllers:
1. A controller with a list of news. (UITableView)
2. Nosity controller (WebView)
In the first controller, I load pictures and show their previews.
For loading I use SDWebImage library.
In the second controller, you need to show the same image, but it is loaded again, since the webview and SDWebImage do not have a common cache.
Are there any hacks to solve this problem?
Answer the question
In order to leave comments, you need to log in
Solved the issue with https://github.com/rs/SDURLCache
I haven't worked with SDWebImage for a long time, but it seemed to me that it caches already loaded images in memory by URL.
In any case, their documentation describes a mechanism that allows you to solve your problem: https://github.com/rs/SDWebImage#using-asynchronou...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question