You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the in app settings controller is visible, if you leave the app and go to the Settings app and change a setting, when you come back to the app the settings controller still has the old values. Fix with these changes:
(void)viewWillDisappear:(BOOL)animated{
...
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil];
}
-(void)applicationWillEnterForeground:(NSNotification*)notify{
// reload in settings in case they were changed in the prefs app.
[[NSUserDefaults standardUserDefaults] synchronize];
// show any changes if they happened in the background.
[self.tableView reloadData];
}
The text was updated successfully, but these errors were encountered:
If the in app settings controller is visible, if you leave the app and go to the Settings app and change a setting, when you come back to the app the settings controller still has the old values. Fix with these changes:
...
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];
}
...
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil];
}
-(void)applicationWillEnterForeground:(NSNotification*)notify{
// reload in settings in case they were changed in the prefs app.
[[NSUserDefaults standardUserDefaults] synchronize];
// show any changes if they happened in the background.
[self.tableView reloadData];
}
The text was updated successfully, but these errors were encountered: