sdwebimage

MBProgressHud and SDWebImagePrefetcher

青春壹個敷衍的年華 提交于 2019-12-22 08:51:53
问题 I'm trying to show a custom MBProgressHUD while downloading a list of URLs with SDWebImagePrefetcher using NSURLConnection methods. SDWebImagePrefetcher has a method that, when called, shows in console the progress of the images download. Now, i would like to show that NSLog progress in the custom MBProgressHUD and I would like the HUD to stay on screen until the process is done, but I don't know how to do it and plus, when my NSURLConnection methods are called, it shows the initial HUD

How to use SDWebImage without any cache for one instance

时光总嘲笑我的痴心妄想 提交于 2019-12-21 10:16:38
问题 I use the SDWebImage image downloading/caching library pretty much any time I display an image in a table view. I would usually implement it like so (in a table view cellForRowAtIndexPath method). [cell.imageView setImageWithURL: [NSURL URLWithString:@"http://asite.com/animage.jpg"] placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; And that would load a cached version if it had one. What about if I wanted to use the simplicity of SDWebImage (with the placeholder / robust downloading

How to use SDWebImage without any cache for one instance

纵然是瞬间 提交于 2019-12-21 10:16:07
问题 I use the SDWebImage image downloading/caching library pretty much any time I display an image in a table view. I would usually implement it like so (in a table view cellForRowAtIndexPath method). [cell.imageView setImageWithURL: [NSURL URLWithString:@"http://asite.com/animage.jpg"] placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; And that would load a cached version if it had one. What about if I wanted to use the simplicity of SDWebImage (with the placeholder / robust downloading

SDWebImage : setImageWithURL fails when used to set image of a UITableViewCell

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-20 10:44:11
问题 When call setImageWithURL, it fails with following, [UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x149a20 2011-12-14 18:11:38.060 [781:707] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x149a20' I can confirm I have included SDWebImage project and required headers correctly as I can use the SDWebImageManager successfully.

Handling download of image using SDWebImage while reusing UITableViewCell

喜欢而已 提交于 2019-12-20 09:45:45
问题 I have used third party library SDWebImage to download image for my UITableView cells, UIImageView is created within cell and fired request while configuring cell like this. [imageView setImageWithURL:[NSURL URLWithString:imageUrl] placeholderImage:[UIImage imageNamed:@"default.jpg"] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) { }]; Its working fine, however when I scroll fast, most of the images are not fully downloaded (I can see that in charles) because of that

How to integrate latest SDWebImage API in my Swift based project?

对着背影说爱祢 提交于 2019-12-18 19:33:32
问题 I have used SDWebImage with Objective C and it worked great for me but now I am learning Swift and trying to integrate the latest version of the API but I am stucking at every step as API is in Objective C and there are no steps mentioned to use the API with Swift. I read the documents and created the bridge header file and included the required file like below: #ifndef MyProject_Bridging_Header_h #define MyProject_Bridging_Header_h #import <SDWebImage/UIImageView+WebCache.h> #import

how to get width and height of image from url without downloading?

别等时光非礼了梦想. 提交于 2019-12-18 12:58:26
问题 I'm using SDWebImage for showing images inside cells. But it is perfect mached to frame of UImageView that I'm doing in code below: NSString * s =[NSString stringWithFormat:@"url of image to show"]; NSURL *url = [NSURL URLWithString:s]; [cell.shopImageView sd_setImageWithURL:url]; My UIImageView is size 50x50. For example image from url is size 990x2100 and my image is not displaying well in the frame given. In this case when hight is bigger, I want to resize my image by proper height ratio

SDWebImage/UIImageView+WebCache.h file not found

独自空忆成欢 提交于 2019-12-18 11:58:05
问题 I'm trying to use SDWebImage in my iPhone app. I followed the step by step tutorial to install SDWebImage into my Xcode project. When I try to build my app i'm getting the following error: Lexical or Preprocessor Issue 'SDWebImage/UIImageView+WebCache.h' file not found Can somebody help me solve this issue? 回答1: A much cleaner "install" of SDWebImage would be as follow: Drag SDWebImage folder from Finder into your Xcode's project On any .m file where you wish to use it add: #import

How to get filesystem path to image cached with SDWebImage (iOS)

萝らか妹 提交于 2019-12-18 09:16:33
问题 I'm using SDWebImage for image caching at UICollectionView in my iOS app. Everything is fine, however, when user scrolls fast over the collection view there is always little pause before placeholder is replaced with the cached image. I believe this is due to cache checks. For better user experience I would like cells to show the proper image instead of placeholder once an image is actually cached. This would be easy if I could get local (device) filesystem's path of the cached image and store

sdwebimage: UIImageView+WebCache.h: No such file or directory

不羁的心 提交于 2019-12-18 03:48:32
问题 I am fairly new to ios development - trying to use sdwebimage in my iphone project. I believe I completed all basic setups as required. But when I build, I get this error: No such file file or directory near this line: #import "UIImageView+WebCache.h" Yes I have added Target Dependencies I have added libSDWebImage.a in Link Binary With Libraries I have -all_load -ObjC in Other Linker Flags I also tried the -force_load ${BUILT_PRODUCTS_DIR}/libSDWebImage.a (64bit mac) My Use Header Search