Firstly, you should never call viewDidLoad
directly. It probably won't cause any problems, but it's best to leave a method like that to be called by the underlying API only. Just move out some of the view initialization into a new method like configureViewForSettings
or something along those lines.
The best approach would be to use delegation. This is most suitable when you need to send back some sort of data or notification to a 'parent' view. Create a new protocol MySettingsViewDelegate
with a method like settingsViewChangedSettings:(MySettingsView *)settingsView
. Then on your settings view controller add a id<MySettingsViewDelegate> delegate
property.
When the settings change call the delegate method like this:
[self.delegate settingsViewChangedSettings:self];
And in your main view controller, when you create/display the settings view, set yourself to be the delegate
mySettingsView.delegate = self;
/* Display the settings view */
Then somewhere:
- (void)settingsViewChangedSettings:(MySettingsView *)settingsView {
/* Settings changed, refresh your view */
[self configureViewForSettings];
}