Q群 567530369,小伙伴们都在这里等你哦~

Settings

Settings serves as a wrapper for NSUserDefaults, a persistent key-value store available only on iOS.

查看方法


文档

方法

get()


static get(key)

Get the current value for a key in NSUserDefaults.


set()


static set(settings)

Set one or more values in NSUserDefaults.


watchKeys()


static watchKeys(keys, callback)

Subscribe to be notified when the value for any of the keys specified by the keys array changes in NSUserDefaults. Returns a watchId number that may be used with clearWatch() to unsubscribe.


clearWatch()


static clearWatch(watchId)

watchId is the number returned by watchKeys() when the subscription was originally configured.