简体   繁体   English

AF Date Helper快速找到成员ISO8601

[英]AF Date Helper in swift could not find member ISO8601

I used cocoapod install AFDateHelper v2.0.1 And I have the following code 我用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)
  }
}

and it said cannot find member .ISO8601 , could anyone help? 它说找不到成员.ISO8601 ,有人可以帮忙吗? Thanks 谢谢

It looks like it was an issue of declaring the extension as public so the headers are available from the extension. 看起来这是将扩展声明为公共的问题,因此可以从扩展中获取标头。 I've update the repo and published a new pod version. 我已经更新了仓库并发布了新的pod版本。 Just run pod update and you should have it working. 只需运行pod update,就应该可以使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM