Difference between revisions of "Swift: Use NSUserDefaults to Store Persistence Data"
From Hawk Wiki
(Created page with "<pre class="brush:swift"> //Set data NSUserDefaults.standardUserDefaults().setObject(["settingABC": false], forKey: "settingABC") //Load Data //func objectForKey(defaultName:...") |
(No difference)
|
Revision as of 04:02, 23 March 2015
//Set data NSUserDefaults.standardUserDefaults().setObject(["settingABC": false], forKey: "settingABC") //Load Data //func objectForKey(defaultName: String) -> AnyObject? let settings = NSUserDefaults.standardUserDefaults().objectForKey("settingABC") as? [String: Bool]