I have question related to NSUserDefaults‘s standardUserDefaults.
What exactly does the standardUserDefaults method do?
Is it initializing the object?
I have question related to NSUserDefaults ‘s standardUserDefaults . What exactly does the standardUserDefaults
Share
Yes or no.
NSUserDefaultsis a singleton, so there is ever only one instance of the class around, andstandardUserDefaultsis the method to get that single instance.If there isn’t an instance of
NSUserDefaultsyet, it isalloc‘ed andinit‘ed and then returned, otherwise this already present instance is returned.