1) You can change the value of settings app programmatically.
You need to call registerDefaults
for changing the settings value programmatically like:
[defaults setObject:@"YES" forKey:@"Toggle];
store a setting then [defaults synchronize];
for saving the settings.
Here Toggle
is the identifier given to any of the settings component.
2) Add your class as observer for NSUserDefaultsDidChangeNotification
like:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changed) name:NSUserDefaultsDidChangeNotification object:nil];
- (void) changed
{
//change the app viewcontroller settings here
}
And change the viewControllers settings in the above method.