15. Model
public struct CategoryList {
public var filterGroups : Array<FilterGroups>?
public var filterKey : String?
public var appStoreAPIVersion : Double?
public var status : Int?
public init() {}
/**
Constructs the object based on the given dictionary.
- parameter dictionary: NSDictionary from JSON.
- returns: CategoryList Instance.
*/
public init?(dictionary: NSDictionary) {
if (dictionary["filterGroups"] != nil) {
filterGroups = FilterGroups.modelsFromDictionaryArray(array: dictionary["filterGroups"] as! NSArray)
}
filterKey = dictionary["filterKey"] as? String
appStoreAPIVersion = dictionary["appStoreAPIVersion"] as? Double
status = dictionary["status"] as? Int
}
}
24. Reference
● The Swift Programming Language (Swift 3.0.1)
● Developing iOS 9 Apps with Swift
● Alamofire is an HTTP networking library written in Swift.
● KingFisher is a lightweight, pure-Swift library for downloading and caching
images from the web.