I want to have a settings toggle on my app’s first screen.
On my main view (the first one that shows when the app loads) I have a table. Each cell loads a different view.
I want to have a toggle on my main view that will change a few aspects of how the other views appear (text color and background image to be specific).
How can this be done?
I would recommend using NSUserDefaults. Here is the code that should be activated wherever the user changes their settings.
And then, in the viewDidLoad part of the new screen, paste this:
Obviously there are better ways than to use a bool to store info with NSUserDefaults. I would actually read Apple’s documentation for this one. It’s interesting and makes sense.