NSUserDefaults Settings Bundle Plist

后端 未结 2 1750
星月不相逢
星月不相逢 2021-01-25 00:15

I have an app that checks for a file upon load from the appDelegate\'s appDidFinishLoading method using a url value that I supposedly store in the NSUserDefaults Settings Root P

2条回答
  •  青春惊慌失措
    2021-01-25 00:26

    You'll need to explicitly save it. For example, if strFirstName is the value that the user modified, then you would save it to the app settings by

     NSUserDefaults* ud = [NSUserDefaults standardUserDefaults];
     [ud setObject:strFirstName forKey:kFirstNameKey];
     [ud sychronize];
    

提交回复
热议问题