Created
June 29, 2018 10:12
-
-
Save randhirraj3130/5caf222a7cb871f5861211d61c9291fe to your computer and use it in GitHub Desktop.
How to set and get data from model class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set data be like this | |
var dataList = [Any]() | |
for items in DataArray | |
{ | |
let data = RunnningJobModel.initWithDictionary(dictionary: items as! NSDictionary) | |
self.dataList.append(data) | |
} | |
// get data be like this | |
let data: RunnningJobModel? = (self.dataList[0] as? RunnningJobModel) | |
//handler(dataList as NSArray?,true) | |
print("data array for running job.", data?.bid_amount, data?.job_id) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment