Pregunta

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 ?

¿Fue útil?

Solución

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"]
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top