문제

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