gpt4 book ai didi

ios - SDWebImage 库在 swift 3 Xcode 8.0 中出现错误

转载 作者:行者123 更新时间:2023-12-01 18:43:16 24 4
gpt4 key购买 nike

我的项目是用 Xcode 7 开发的,昨天我用 Xcode 8 更新了它,并将 swift 编码转换为最新的 swift 版本 swift 3.0。现在它在某个地方给了我一个错误,我已经解决了所有问题,但没有获得 ID 用于模棱两可地使用 sd_setImage(with: ,placeholderImage: ,completed)线。谁能帮我解决这个问题?我正在使用 SDWebimage在我的应用程序中加载图像的库。

enter image description here

谢谢

已经检查了这个链接,但没有得到做什么。
Ambiguous use of 'sd_setImage(with:placeholderImage:completed:)' with Swift 3

最佳答案

Swift 3 有一种解释 Obj-C header 的新方法,似乎现在有来自 2 个 diff 类冲突的 2 个方法签名。

临时修复可能是使用 url:placeholderImage:options:completed 变体。

    view.sd_setImage(with: photoURL, placeholderImage: placeHolderImage, 
options: [.continueInBackground, .lowPriority]) { (image, error, cacheType, url) in
...
}

关于ios - SDWebImage 库在 swift 3 Xcode 8.0 中出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39697357/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com