sdwebimage

How to update image in cache when image changed on server with SDWebImage

穿精又带淫゛_ 提交于 2019-12-29 05:52:09
问题 I am using SDWebImage library to download images from server. https://github.com/rs/SDWebImage SDWebImage not able update the cached image when image updated on server with the same url. 回答1: SDWebImage does some caching by default, so it would be better to use a new URL if the image changes. So, for instance, if you have control over the URL and can change it every time the image has changed, you could do that. If that's not the case, try using SDWebImageRefreshCached in the options field in

iOS App Freezes on PushViewController

帅比萌擦擦* 提交于 2019-12-27 22:09:06
问题 My navigation controller intermittently will freeze on push. It seems to add the new view controller onto the stack, but the animation never takes place. I also have two other containers that hold view controllers on the screen, and I can interact with both of them just fine after the navigation controller freezes. The really interesting thing is if I try to push another view controller onto the navigation controller's stack, I noticed that there is an extra view controller on top of the

Xcode clang error when adding SDWebImage framework

只愿长相守 提交于 2019-12-25 07:01:02
问题 I am trying to compile an app that use SDWebImage, when I add the framework to xCode I keep getting the following error. I have attempted to add the framework by clone the git repo ld: framework not found SDWebImage clang: error: linker command failed with exit code 1 (use -v to see invocation) 回答1: Linking in Xcode requires a bit of work. We can tell what to do or suggest a better way. As I consider "dropping framework" solution a very bad habit, I'd strongly suggest a better way: Use

SDWebImage with PHAssets

一笑奈何 提交于 2019-12-25 04:49:35
问题 i have an application where i am loading large amount of images from database and showing them in my gallery, what i was doing earlier is i was getting photo url (local identifier) from PHAsset and then accessing the image using PHCacheManager, but it slows down my scrolling and also shows lags while updating images in new cell. I was trying to use SDWebImage here by passing the url to the sd_setImageWithURL: method, however i found out that the URL is actually a local identifier which is not

SDWebImage doesn't work

99封情书 提交于 2019-12-24 07:57:49
问题 What am I doing wrong? Everything runs but I don't get the Images, help! Thanks! import UIKit import Firebase import FirebaseDatabase import SDWebImage struct postStruct { let title : String! let downloadURL : String! } class ZeroHomeViewController: UITableViewController { var posts = [postStruct]() override func viewDidLoad() { super.viewDidLoad() let ref = Database.database().reference().child("Posts") ref.observeSingleEvent(of: .value, with: { snapshot in print(snapshot.childrenCount) for

Does SDWebImage support “not-when-fast-scrolling” (skimming) for lazy loading?

萝らか妹 提交于 2019-12-24 04:42:08
问题 When doing lazy loading (table of UICollectionView), for a correct result, you should NOT begin downloads, when the user is scrolling very quickly over the collection. So, imagine a vertical scroll with 200 panels each with an image; four or five are seen onscreen at a time. When it first loads, the first 4 visible images should begin loading. If you scroll down a little, the newly visible images should begin to load. BUT if the user: very quickly scrolls down to (say) position 100 and then

SDWebImage UIImageView+WebCache crashing on 64 bit devices

最后都变了- 提交于 2019-12-24 03:25:34
问题 I have this code: #import <SDWebImage/UIImageView+WebCache.h> - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { [cell.thumbnail setImageWithURL:[NSURL URLWithString:thumbnailURL] placeholderImage:[UIImage animatedImageWithImages:loadingArray duration:1] options:indexPath.row == 0 ? SDWebImageRefreshCached : 0]; } where "loadingArray" is just an array of png images. cellForRowAtIndexPath obviously has a lot more code. This code works on 32

SDWebImage UIImageView+WebCache crashing on 64 bit devices

依然范特西╮ 提交于 2019-12-24 03:25:20
问题 I have this code: #import <SDWebImage/UIImageView+WebCache.h> - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { [cell.thumbnail setImageWithURL:[NSURL URLWithString:thumbnailURL] placeholderImage:[UIImage animatedImageWithImages:loadingArray duration:1] options:indexPath.row == 0 ? SDWebImageRefreshCached : 0]; } where "loadingArray" is just an array of png images. cellForRowAtIndexPath obviously has a lot more code. This code works on 32

How to use SDWebImage in my project

百般思念 提交于 2019-12-23 20:16:40
问题 Iam using collectionview to load image.These images are loaded from url in background thread. Hence the scrolling is not smooth.The images in url get expired after seconds hence i want to update the image with new image.How can i use the SDWebImage to load image and make scrolling smooth? Can anyone please help me to solve this. 回答1: Use this code [YOUR_CELL_NAME.YOUR_IMAGE_NAME setImageWithURL:[NSURL URLWithString:@"IMAGE URL"] placeholderImage:[UIImage imageNamed:@"PLACEHOLDER IMAGE NAME"]]

iOS solution to load images with animation only if they are not already cached in memory with SDWebImage

ⅰ亾dé卋堺 提交于 2019-12-23 16:28:08
问题 I've been struggling with this problem for a couple of days now. Previously I used AFNetworking category to load and cache images, but it doesn't provide a cache type in it's callbacks. So I used to keep track in each controller which images have been already loaded. I looked through SDWebImage and it provides exactly what I was looking for - SDImageCacheType . Now i'm trying to come up with an easy to use (hopefully a one-liner) solution to load images in table and collection views with