Domanda

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 ?

È stato utile?

Soluzione

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"]
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top