object(forKey:)
Returns the object associated with the specified key.
Declaration
func object(forKey defaultName: String) -> Any?Parameters
- defaultName:
The key to retrieve from the defaults database.
Return Value
The object associated with defaultName, or nil if the key isn’t present in the defaults database.
Discussion
The returned object is immutable, even if you originally set the key to a mutable value.