Reputation: 11317
Any thoughts on this ?
Thanks for shedding some light on this.
Upvotes: 0
Views: 210
Reputation:
NSUserDefaults
is ready made database provided to us. If we use it, we are saving things in database and making fetch operation.
If you want your data to be persistent then use NSUserDefaults
and/or your own database.
If you want to share data globally and dont want it to be persistent
then use singleton
class.
It is based on our requirement if we want a shared class (singleton class) or a database (NSuserDefaults).
Upvotes: 1