How to change the app preference settings through code?
I have listed my app in the device setting app.Now I can change my app settings through the device app settings app.
Now what I am trying to do is the reverse.
I am trying to make a app so that it can itself change its preferences in the device settings app if I change the preferences of my app from within the app.
Any ideas Friends,
Thank You All.
- ARC semantic issue “multiple methods named 'setRotation' ” while archiving only
- Cocos2d FCM Push Notification not working
- What is the alternative method for the “self.isTouchEnabled ” in Cocos2d 2.0?
- Overlaying a UIView onto a Cocos layer?
- Moving a Stick figure, anchorpoints, animation, or something else…?
- Cocos2d How to Switch Scenes
Solutions Collect From Internet About “How to change the app preference settings through code?”
Nice and simple:
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"MyPreferenceKey"];
NSUserDefaults includes convenience methods for setting ints, floats, strings, and so on. You can also just use -setValue:forKey:.
When you change a value in your app using
NSUserDefaults, the setting well change in the Settings app, too.
- Location services don't stop when application is terminated
- In Xcode4, the new interface builder says “no selection”
- What are @property, @synthesize, @implementation, @interface in iphone programming?
- IBM Worklight – WL.App.getDeviceLanguage() API method does not return correct language code in iOS
- Swift operators and nil
- How to have multiple position state for viewcontroller's views?
- Storyboard won't update in simulator
- iOS: dispatch_get_global_queue QOS_CLASS_BACKGROUND crashes on 7.1.2
- Saving Picked Image to CoreData
- Localization: application crashes when language is changed in simulator
- Stop HTML5 audio from looping when iOS Safari is closed
- Download image asynchronously
- Unable to draw MKPolylineView crossing longitude +/-180
- Change the selected TabBar index on button click
- UITableViewAutomaticDimension Not Working for Resizing Cell Height