UserDefaults allows you to read and write application level user
default values. See addState
if you want to store state along with a document.
Methods
- <static> stringForKey(key) → String
- <static> setStringForKey(string, key)
Method Details
-
<static> stringForKey(key) → {String}
-
Read from the user defaults.
Parameters:
Name Type Description key
String User defaults key.
Returns:
- Type
- String
-
<static> setStringForKey(string, key)
-
Write to the user defaults.
Parameters:
Name Type Description string
String New defaults value.
key
String Key to read value.