سؤال

What I'm trying to figure out is how to automatically save and load data using NSUserDefaults. I know how to do save and load data if I have save and load button, using NSUserDefault. I'm not sure which of the methods I should be using in the AppDelegate, if that is right?

Can somebody point me help me, please?

Thanks

Sam x.

هل كانت مفيدة؟

المحلول

Depends on when (at which point in the lifecycle of the application) you want the loading and saving to happen. The earliest point for loading though I think is when applicationDidFinishLaunching is called.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top