iPhone and NSUserDefaults

后端 未结 2 947
一生所求
一生所求 2021-01-07 05:25

In my viewWillLoad: method I\'m currently doing something along these lines:

- (void)viewWillAppear:(BOOL)animated {
   NSUserDefaults *defaults = [         


        
2条回答
  •  北海茫月
    2021-01-07 05:51

    You should provide defaults in your code using -registerDefaults:. This is typically done in an +initialize method for whatever class uses the settings. See Using NSUserDefaults.

提交回复
热议问题