ios - Swift 中的 AF 日期助手找不到成员 ISO8601

标签 ios swift struct nsdate

我使用cocoapod安装AFDateHelper v2.0.1 我有以下代码

import AFDateHelper
import SwiftyJSON
struct MyStruct {
  var date: NSDate! 
  init(inJson : JSON) {
    self.date = NSDate(fromString: inJson["date_gmt"].string!, format: .ISO8601)
  }
}

它说找不到成员.ISO8601,有人可以帮忙吗? 谢谢

最佳答案

看起来这是一个将扩展声明为公共(public)的问题,以便可以从扩展中获取 header 。我已经更新了存储库并发布了新的 pod 版本。只需运行 pod update 就可以正常工作了。

关于ios - Swift 中的 AF 日期助手找不到成员 ISO8601,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31374959/

相关文章:

android - 如何在页面加载时自动显示键盘

ios - iTunes Store Search API 中的空结果

ios - 如何在ios13中禁用pdfkits pdfview中的查找、共享、转发菜单项

iphone - 应用程序只对肖像启用,但 UIImagePickerController 在 iOS6 中旋转

iphone - iPad App - 以编程方式更改语言

ios - UITableViewCell 上的阴影性能不佳

swift - 将 Ensembles 添加到现有 Coredata/iCloud App 的步骤

c - 带指针的嵌套结构

C 结构错误 "pointer to incomplete class type is not allowed"

c - 使用指针在结构中输入