swift - Alamofire:类型 'Request' 的值没有成员 responseImage?

标签 swift cocoapods alamofire

我正在做一个项目,使用 Alamofire + AlamofireImage。我刚刚通过 CocoaPods 安装了 AlamofireImage,但出现了这个错误:

Value of type 'Request' has no member 'responseImage'

对于行:

Alamofire.request(.GET, locationURL).responseImage { response in
    if let image = response.result.value { // more code

在所有其他项目中工作正常,Podfile 安装行也完全相同。

最佳答案

不确定整个问题是什么,因为我不必在其他项目中这样做,但导入 AlamofireImage 可以解决问题。最奇怪的事情。

关于swift - Alamofire:类型 'Request' 的值没有成员 responseImage?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38796454/

相关文章:

ios - 在 SpriteKit 中预加载纹理

ios - 无法找到 CocoaPods 的规范

ios - 函数调用的参数太多,预期为 0,有 2

ios - CocoaPods 框架 : codesign is trying to use a code signing identity I've deleted

swift - 无法将 Alamofire 添加到 Swift 项目

xml - 需要帮助使用 Alamofire 进行 POST 调用以检索 XML

ios - 如何快速显示计量值?

ios - 以错误的顺序从 Firestore 存储下载 URL

ios - 在 Swift 4 的搜索栏中搜索超过 2 个单词时应用程序崩溃

json - 如何在 Swift 中循环访问 Alamofire 数据响应?