简体   繁体   中英

AF Date Helper in swift could not find member ISO8601

I used cocoapod install AFDateHelper v2.0.1 And I have the following code

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? 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. Just run pod update and you should have it working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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