I have question related to NSUserDefaults
's standardUserDefaults
.
What exactly does the standardUserDefaults
method do?
Is it initializing the object?
views:
31answers:
1
+1
A:
Yes or no. NSUserDefaults
is a singleton, so there is ever only one instance of the class around, and standardUserDefaults
is the method to get that single instance.
If there isn't an instance of NSUserDefaults
yet, it is alloc
'ed and init
'ed and then returned, otherwise this already present instance is returned.
Douwe Maan
2010-09-07 07:12:42