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 ?

有帮助吗?

解决方案

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"]
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top