ios - NSUserdefault and core data -
what nsuserdefault ? , how can used store peristent data of app . please clear doubt on when use them , how can useful performance wise ?
with nsuserdefaults
class, can save settings , properties related application or user data.
example, save profile image set user or default color scheme application. objects saved in known ios “defaults system”
. ios defaults system available throughout of code in app, , data saved defaults system persist through application sessions. means if user closes application or reboots phone, saved data still available next time open app.
performance
the nsuserdefaults
class caches values internally lookup extremely fast. overhead of [nsuserdefaults standarduserdefaults]
vs instance variable small wouldn't notice if did 5 million times in code.
Comments
Post a Comment