I would like to build a settings interface for the iOS app.
Note - These settings would often change so I prefer a setting interface app instead of the settings bundle
My thoughts
Problems:
In modal view, the navigation bar doesn't seem to appear. I would need the navigation bar, so that I can create a "Save" button on it ?
In order to solve the above mentioned, I created a UIViewController to manage the settings view and added a navigation bar and a table view under the UIViewController's view (Using a UITableViewController to cause the navigation bar to scroll with the cells)
But creating a UIViewController doesn't allow me to create a table with static content
Questions:
If you're using Storyboarding, this is a very easy thing to accomplish. Just add a new scene to your storyboard:
...then add a UIBarButtonItem
to your main scene:
...then link the UIBarButtonItem
to the scene you just added by using Control+Click to drag from the button to the scene. Choose a "modal" transition:
...then, in the new scene you've added, you can customize the table cells by using the right-hand side menu. If you choose "Custom" as the cell type, you can add switches, etc to the tableview.
From there, I'd recommend you take a look at hooking those switches up to methods, and then take a look at NSUserDefaults
for how to store the settings and link them up to this viewController. Here's the documentation for NSUserDefaults.