set(_:forKey:)
Sets the value of the specified key to a double.
Declaration
func set(_ value: Double, forKey defaultName: String)Parameters
- value:
The double value to store in the defaults database.
- defaultName:
The key that contains the setting’s name.
Discussion
This method places the double value in an NSNumber type before writing the key and value to the defaults database. After you call this method, the system generates a didChangeNotification for registered observers.