Whats the best way to handle changes to settings (iPhone/iPad)?
I have just been implementing the InAppSettingsKit for my app and now I'm trying to determine the best way to push out the new settings to my app. At present I have a couple of different view controllers that will be effected by setting changes. I understand that I will need to use a delegate method, however I would like some advice on how best to update other view controllers with new settings. Is there some sort of best pract开发者_JAVA百科ice that should be followed?
I believe that inAppSettingsKit uses NSUserDefaults
, in which case the same practices apply.
General good practice for changed settings is to observe the notification NSUserDefaultsDidChangeNotification
and update your views in the observer method. As many observers are usually required, delegate methods aren't a good solution for this problem.
精彩评论