sdwebimage

How to cache image and scale it correctly?

孤者浪人 提交于 2019-11-28 12:47:36
问题 I am currently using SDWebimage and calling it like so, not sure if it is caching or how I can check it? Also, how do I scale it accordingly without it looking stretched. The picture is originally 512 x 512 and I want to scale it down. I saw this post was not sure if I should be using this method? Resize UICollectionView cells after image inside has been downloaded //setting up each cell -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:

How to install SDWebImage

天涯浪子 提交于 2019-11-28 07:54:27
问题 I need to manage photos in my app and have read much about SDWebImage framework which seems to be the best way to go. However I am finding it incredibly difficult to install. I dont know Ruby and have never used a podfile, so am installing it by downloading the latest SDWebImagefolder & framework and adding them to my project. However when I try to import into my viewcontroller using the suggested imports: #import <SDWebImage/UIImageView+WebCache.h> #import "UIImageView+WebCache.h" I get a

What happens to SDWebImage Cached Images in my app when the image file on the server changes?

泄露秘密 提交于 2019-11-28 02:57:27
I am using the SDWebImage library to cache web images in my app: https://github.com/rs/SDWebImage/blob/master/README.md Current Usage: [imageView setImageWithURL:[NSURL URLWithString:profilePictureUrl] placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; My question is what happens once the image has been cached and then a couple of days later that image file on the server has been updated with a new image? At the moment my application is still displaying the cached image. I can't see in any of the documentation on setting a cache timeout or something that recognises that the file size

How to include SDWebImage framework

旧城冷巷雨未停 提交于 2019-11-27 16:43:38
问题 I am working on an iPhone app. In this app I have used many images and I need to store those images in cache memory. For this I have found SDWebImage is the right framework but I can not include this framework in my iPhone project. Can anyone please suggest how to include this framework in my project and how to save and retrieve images using this framework? 回答1: Go to SDWebImage frame work download Site. -Click on Zip tag and download the archive. -Unarchive the file. -You will find the

SDWebImage and setting custom HTTP headers?

冷暖自知 提交于 2019-11-27 13:38:21
问题 I´ve just changed my code for caching images away from EGOImageCache to SDWebView. Unfortunately i don´t know how to set custom HTTP headers as i have to send authentification to be able to fetch images. It was easy done with EGOImageCache as i´ve extended the NSURLRequest at the appropriate place. But i don´t know how to do that with the SDWebView.framework. I see the headers and i´ve found methods in SDWebImageDownloader.h containing /** * Set a value for a HTTP header to be appended to

SDWebImage process images before caching

帅比萌擦擦* 提交于 2019-11-27 11:22:23
问题 I fetch a lot of images from the web, and they are all kind of sizes - they can be big, small etc.. So I can resize them when I display them in the cell but this is inefficient. It's way better to resize them after SDWebImage have download them and cache them resized, instead of storing large images on disk and resize them for every cell. So how can I do this with SDWebImage, or I have to hack a bit onto the class? 回答1: I had the same problem as you, and tried tweaking SDWebImage first, but

SDWebImage does not load remote images until scroll

[亡魂溺海] 提交于 2019-11-27 10:38:27
问题 I am using SDWebImage library to load remote images into a table view which uses a custom cell class i have created. I simply use [cell.imageView setImageWithURL:url placeholderImage:[UIImage imageNamed:@"loading.jpg"]]; in cellForRowAtIndexPath: Now the problem is it loads images in the visible cells only and not for cells that are offscreen for which i have to scroll up and down to make them load. Is there any way i can load all images without having to scroll the table view. Thanks in

Dynamic cell height with SDWebImage

不想你离开。 提交于 2019-11-27 07:17:39
问题 I have a table view and table view cells with an image view on them. I want them to have a fixed width but with a dynamic height (depending on the image coming in from the server). I am using SDWebImage to download and set the image, but the table view cells are turning out very weird. I didn't forget to: postTableView.estimatedRowHeight = UITableViewAutomaticDimension postTableView.rowHeight = UITableViewAutomaticDimension cellForRow method: func tableView(_ tableView: UITableView,

What happens to SDWebImage Cached Images in my app when the image file on the server changes?

好久不见. 提交于 2019-11-26 23:53:36
问题 I am using the SDWebImage library to cache web images in my app: https://github.com/rs/SDWebImage/blob/master/README.md Current Usage: [imageView setImageWithURL:[NSURL URLWithString:profilePictureUrl] placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; My question is what happens once the image has been cached and then a couple of days later that image file on the server has been updated with a new image? At the moment my application is still displaying the cached image. I can't see