Hi,
I'm trying to ascertain the best possible way to have a very functional "settings" controller.
Is there something like "Global Variables"? Something that can be accessed from all ViewControllers.
Some setting values are BOOLs or Integers.. I can only think of is NSUserDefaults. easy to retrieve and/or set.
But, For example, a user goes unto the settings tab, which is within my app, and changes a BOOL from YES to NO. and the user comes back to the main view controller.
And if that BOOL is used in cellForRowAtIndexPath, i'd hav to reload the table to take effects UNLESS we say that app takes effect only after restart, which isnt good.
Would I hav to access NSUserDefaults in CellForRowAtIndex? to make the change? Any better alternatives?
I'm trying to ascertain the best possible way to have a very functional "settings" controller.
Is there something like "Global Variables"? Something that can be accessed from all ViewControllers.
Some setting values are BOOLs or Integers.. I can only think of is NSUserDefaults. easy to retrieve and/or set.
But, For example, a user goes unto the settings tab, which is within my app, and changes a BOOL from YES to NO. and the user comes back to the main view controller.
And if that BOOL is used in cellForRowAtIndexPath, i'd hav to reload the table to take effects UNLESS we say that app takes effect only after restart, which isnt good.
Would I hav to access NSUserDefaults in CellForRowAtIndex? to make the change? Any better alternatives?