I had heard that the customizing of the tab bar icons was free when you use UITabBarCotroller (which it looks like it is) but what magic do I need to add to get that layout to stick across instances of the application?
UITabBarController
manages an array of UIViewControllers
. It is up to you to preserve the ordering of the array when the app quits and use it again when the app launches.
When your app quits, you should look at the tabBarControllers.viewControllers
array and then make a corresponding array of names or identifiers and save it using NSUserDefaults
.
When your app launches, you can look at that array of names or identifiers and use it when you create the array of view controllers. Then set tabBarControllers.viewControllers
to that array.
Sorry if that's vague, but you can't store the view controller objects themselves in app's settings, so you need to come up with some other kind of mapping. How best to do that depends on your code.
If the array of view controllers is being set in your nib file, that means you'll need to start doing it programmatically, from your app delegate's applicationDidFinishLaunching:
method. applicationWillTerminate:
is a good place to save the order, though you could also set an object to be a tab bar delegate and save changes as they are made (so they won't be lost if your app crashes).