Question

In application preference settings i have text field. Behavior of textField: 1. When user enters text and launch application, the entered text is taken and processed. 2. when user clears textFiled and launch, the some text will be generated dynamically and has to put back the dynamically generated text to textField in settings preferences.

Is there any way to write the value to textField in application settings preferences ?

Était-ce utile?

La solution

The values of Settings.app for your application are stored in the NSUserDefaults. You should be able to set them with:

[[NSUserDefaults standardUserDefaults]setValue:newValue forKey:@"theKeyYouDefinedInThePlist"]
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top