NSUserDefaults is the Objective-C API for storing and retrieving user preferences in Apple's Foundation framework for Cocoa and Cocoa Touch.
I have a simple object which conforms to the NSCoding protocol. import Foundation class JobCategory: NSObject, NSCoding { var id: Int …
ios swift swift3 nsuserdefaults nscodingThere's two ways of storing an NSDate in NSUserDefaults that I've come across. Option 1 - setObject:forKey: // Set NSDate *myDate = […
cocoa datetime nsdate nsuserdefaults nstimeintervalI've added NSUserDefaults data retrieval to my app, which is pretty nice. But for testing I would like to reset …
iphone ios cocoa-touch uikit nsuserdefaultsI want to save a Swift Style String Array into NSUserDefaults, but acutally the "if" statement in the code says …
ios swift string nsarray nsuserdefaultsI have a value in NSUserdefaults. I am using storyboard, it is embedded in UINavigationController. - (BOOL)application:(UIApplication *)application …
objective-c uinavigationcontroller storyboard nsuserdefaults appdelegateI would like to print all values I saved via NSUserDefaults without supplying a specific Key. Something like printing all …
iphone ios objective-c ios6 nsuserdefaultsI am trying to store an array to NSUserDefaults and retrieve the array when needed to populate a UITableView. Currently …
ios swift tableview nsuserdefaultsAre the following two lines equivalent? 1. [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"example key"] 2. [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"example key"]
nsuserdefaultsthis is a class Place I defined: class Place: NSObject { var latitude: Double var longitude: Double init(lat: Double, lng: …
ios swift nsuserdefaultsI'm trying to save an array with NSUserDefaults and then load the array, but I get the error "argument for …
swift nsuserdefaults loaddata