sdwebimage

No such module 'SDWebImage'

偶尔善良 提交于 2019-12-12 19:39:11
问题 I installed SDWebImage using CocoaPods . My podfile was as it is written in the https://github.com/rs/SDWebImage platform :ios, '8.0' use_frameworks! pod 'SDWebImage', '~>3.7' when I import SDWebImage it says No such module 'SDWebImage' my Xcode version is: Version 7.2.1 回答1: Use the new <YourProject>.xcworkspace instead of <YourProject>.xcodeproj . The xcworkspace contains your project and your pods after pod install . 回答2: Just build your project before importing any new pods in your code

SDWebImage, Swift: SDWebImageRefreshCached unresolved identifier

假如想象 提交于 2019-12-12 18:31:05
问题 Strange.. something simple that is in the docs doesn't seem to work with Swift. See below code. Where exactly is "SDWebImageRefreshCached" when using Swift?? self.profileImageView.sd_setImageWithURL(profileImageUrl, placeholderImage: UIImage(named: "default_profile_image"), options: SDWebImageRefreshCached) 回答1: In Swift, the enums are exposed slightly differently. You would be looking for SDWebImageOptions.RefreshCached , or .RefreshCached for short. Your line of code thus would be: self

SDWebImage checking if image cached using Swift: Ambiguous Reference

折月煮酒 提交于 2019-12-12 11:37:49
问题 I am trying to find out if an image has already been cached using SDWebImage but when I try to use this method I get the error "Ambiguous reference to member 'cachedIageExistsForURL". let bool = SDWebImageManager.cachedImageExistsForURL(imgURL) I am using Swift and I have a bridging header to use the library. 回答1: cachedImageExistsForURL is not a class method on SDWebImageManager , it's an instance method which you need to use on the sharedInstance : SDWebImageManager.sharedManager()

The width of images in UITableViewCell changes to the click

馋奶兔 提交于 2019-12-12 04:16:32
问题 @nathan this is my entire controller. My problem is that when I click a tableview cell, the image size is changed and becomes too long. I can not figure out how to fix the size, I tried everything. To do URL parsing, I used NSXMLParser, while I used SDWebImage to load images into cells. When I press an element its size changes. Like this: How to fix? 回答1: That seems like a content mode issue. Set the imageView's contentMode to aspectFit / aspectFill (depends on what you want to achieve) 来源:

Problems with current version of SDWebImage

流过昼夜 提交于 2019-12-12 03:58:09
问题 When I download the latest sourcecode of SDWebImage from the GitHub repo, I get compile errors in it. For example in SDImageCache.m I have undeclared or unsynthesized properties. In initwithNameSpace: a variable named _ioQueue is used, but it is not declared anywhere and some others. Same is in SDWebImageManager.m in its init method. It uses an undeclared variable named _imageCache. There is more of this. Where can I download the latest working code of this project? 回答1: I was using iOS 5 for

How to load images downloaded via SDWebImage into a view controller when download is complete?

本秂侑毒 提交于 2019-12-12 01:24:06
问题 I have an array of 10 URLs that are linked to images of my website. I'm using SDWebImages for async image downloading and a for loop to run thru the array of URLs. But the code would just run thru the For-loop before the first image can be downloaded. Therefore, the rest of the images never gets downloaded and the new view controller is never displayed How can I allow the code to run thru the for-loop, and once an image has been downloaded, it pops up a view controller and gets updated

TableViewController using SDWebImage with UIImage

元气小坏坏 提交于 2019-12-11 20:43:00
问题 Good afternoon, Im trying to use SDWebImage in my TableViewController for the first time and I have some problems using the "setImageWithURL" property because it only admits a UIImageView but I have a UIImage in order to parse the data from my JSON. How I have to change my code in order to use a UIImageView instead of a UIImage? Because UIImageView doesn't have the same functions as UIImage and I have to create my Image from a URL. Here is my code, I hope you can help me with some tips: -

load images using SDWebImage in order

江枫思渺然 提交于 2019-12-11 19:39:36
问题 After a lot of reading and recommendations, I am trying to implement SDWebImage framework in my app. I am able to download images from the server but the issue is that as the images are different sizes, they are not downloaded in the order that I call them (and would like them to be). Here is the framework for reference: https://github.com/rs/SDWebImage As you can see evidence of this from the print-line: 2013-08-20 11:11:01.785 Project[10785:c07] SD LOAD 1 array count = 1 2013-08-20 11:11:02

UITableView Photos Show Up Multiple Times from Graph API

谁说胖子不能爱 提交于 2019-12-11 17:33:25
问题 Right now I am making a Facebook Application For iPad. I pulling the wall and putting it into a UITableView. The way I am putting photos into the tableview is like this: In the requestDidLoad for querying for array of images. -(void)request:(FBRequest *)request didLoad:(id)result { //Determine if result is a array of images if ([result objectForKey:@"images"] != nil) { if ([request.url rangeOfString: @"=images"].location != NSNotFound) { realPicsonWall = result; NSLog(@"Result Object: %@",

Adding a UIImageView to UIButton

天涯浪子 提交于 2019-12-11 17:31:18
问题 I created a UIScrollView which contains several UIImageView instances. The SDWebImage framework is used in order to cache images and present them in the UIImageView instances. Now I want to be able to click on these instances of UIImageView. Previously I added UIButtons to the UIScrollView and added an image to this button. But know I am not able to add a UIImageView to a button. How should I solve this? is it an option to place an UIButton over this view? and how should I do this? I