The UserDefaults class provides convenience methods for accessing common types such as floats, doubles, integers, Boolean values, and URLs
.
A default object must be a property list—that is, an instance of (or for collections, a combination of instances of) NSData, NSString, NSNumber, NSDate, NSArray, or NSDictionary
. If you want to store any other type of object, you should typically archive it to create an instance of NSData
.
0
solved Save an Object into User Defaults [duplicate]