Good user settings example?

Do you know of any good, pre-made examples that I could leverage into my project?


I've been working on an app for quite some time and I'm getting close to a beta trial. I'd like to spruce up the interface, so I'm looking for a good solution for collecting user preferences. Right now I've got a mess of toggle switches, entry fields and such all over the place. It all works just fine but it would be confusing, to say the least, to a new user. I'd like to move it all into a professional looking settings view, something that users are familiar with and could more easily get going.


All of my app's settings are currently stored in standard UserDefaults except for user-accepted authorizations for notifications, location services and such.

Replies

>something that users are familiar with and could more easily get going.


Have you tried starting w/Xcode's Settings template?


https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html

A challenge with settings is for user to understand what they mean.

For the developer, it's crystal clear, because you know how the app works ; but for user. So take care on how you foumulate the settings.

In iPhone settings (General), notice that each setting has a dedicated view, with a detailed explanation.

You say you have a lot of settings all over the place: so, ask yourself if all settings are really useful for user and not just a developer fancy. Or at least, group the less used in an 'advanced' page.

Finally, look on how to organize settings hierarchichally (2 or 3 levels max)

You're preaching to the choir. These are all good reasons why I've come looking for a good example I can adapt to my app with minimal re-invention of things that have been solved many times by others.

Good point.


I find Maps illustrates pretty well those rules.

I'm not having much luck finding anything to get me started. The closest thing I've found is the Expandable UITableView example at GitHub and Appcoda that I mentioned earlier. It loads a plist into a table but doesn't write back to that table when the user makes changes. So it will need quite a bit of modification to use with my current UserDefaults-based scheme. I'll need to load my app settings from UserDefaults into a two-dimensional array, display that as an expandable table, and then write any user changes back into UserDefaults.


Is that a typical approach to the solution?


The Eureka tutorial over at raywenderlich also looks very interesting but I didn't see a good example there of what I'm seeking. It may well be possible with the tools there, but it wasn't obvious.


Some of my app's user settings will change rarely, such as the choice of units °C versus °F, or lb versus kg. Putting these into a plist instead of UserDefaults might be better form? But a few things will change more often, perhaps several times each time the app is run. It seemed from the documentation that a plist was not the best strategy for that case.


Curious to hear your thoughts.