New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 3.0 Support #1627
Comments
Of course it will. Right now, since we don't have any explicit Swift code, I'm not sure if we need to do anything in particular for this. |
There is a problem when using SDWebImage with Swift3. After updating to Swift 3.0, the Swift compiler translates the ObjC headers for UIImageView+WebCache.h into Swift, then it occurs a naming collision. Please see this stackoverflow question for more details: http://stackoverflow.com/questions/38949214/ambiguous-use-of-sd-setimagewithplaceholderimagecompleted-with-swift-3 |
Any idea when the issue Tinghui mentions gets fixed? |
Won't we need to do any adjustment to Swift3.0? |
Can you please take a look? Not sure if you are ware of this. @bpoplauschi |
images are not loading anymore after updating to swift 3 ? am i at right place ? |
I confirm, it's not working with Swift 3.0, SDWebImageCompletionBlock not recognized. :( |
@billionbucks Had the same for my list with images, the first ones were loaded, after a while it stopped loading pictures. UPDATE |
having the same issues after updating my app to swift 3.0 images stopped loading. Joridor's solution does not work for me. The completion block is fired but when the image that I get back wont seem to load into the UIImageView |
The completion block is called but the image is nil. |
@billionbucks @ducmaxime @joridor can you provide some image urls that don't work for you so we can test? |
PS: I just created a demo Swift 3 project, added SDWebImage and indeed got into the 'ambiguous method' issue, but I easily passed that by adding the |
Hi, is it possible you post this sample project. I am also having the same difficulty. tks |
@bpoplauschi My situation: I have a tableview filled with images. The first +- 50 pictures were working correctly. But if you kept scrolling, the images would stop loading. To make the list work again, I had to specify the option [.continueInBackground, .lowPriority] in the options. (think previous value was: SDWebImageOptions(rawValue:0)) |
Hi @bpoplauschi I had the same issue, images were not loading in swift 3. I had an existing project in swift 2.3 and converted it to swift 3. After that, this issue started. In my case, it was for few ImageViews the images were not showing, while for others they were showing. After much try and debugging what worked for me was, to remove the ImageView from the storyboard not showing image and add a new ImageView, connect it to view controller and do the code. That fixed it for me. |
Recently i used swift 3.0 and also have same problem. Used |
@henry0475 which version of SDWebImage? |
@bpoplauschi Hi, I'm using 4.0.0 version. I don't know how to resolve this problem.My code:
Then Xcode has error,likes above. |
@henrik for version 4.0.0, use
|
@bpoplauschi Thanks!! Using your suggestion code, error has been solved. But Xcode showed a new waring, "Expression of type 'SDWebImageDownloadToken?' is unused" . :( |
Here's my sample project: https://github.com/rs/SDWebImage/files/515471/Swift3TestSDWebImage.zip. If your images are available via http, you need to add the Also, you can try the 4.0.0 (right now, beta2 is available via cocoapods, even though it's not an official release yet). |
Hi! This was my problematic code: I solved the problem by removing that line and adding another image on top with static png croped circular (horrible, i know, but deadlines are my priority right now). Hope it helps someone! |
@bpoplauschi |
@gujinku thanks. About an ETA, in think it will take a few more days to properly test and wrap up the documentation. |
I had issues with the compiler finding "sd_setImage" until I added an "import WebImage" at the top of my file. Just an FYI if some people are having some build errors in their Swift 3 project. |
Any update on this issue? |
Will there be support for Swift 3.0?
The text was updated successfully, but these errors were encountered: