swift yymodel
2020-02-26 本文已影响0人
Alan龙马
swift中YYModel的使用
https://www.jianshu.com/p/4a81fcb29c9e
转模型时候给默认值
var imageurl: String = ""
var InformationID: String = ""
字典
let model = HomeModel.setModel(with: json["datas"].dictionaryObject!)
数组
let bannerArray = NSArray.yy_modelArray(with: ServiceBannerModel.self, json: bannerlist) as! [ServiceBannerModel]