Best practices for designing table view for app settings?

前端 未结 2 1027
轮回少年
轮回少年 2021-02-15 11:34

For my app\'s settings view controller, I want to have a table view with a bunch of options the user can tweak. Toggle switches, segues, steppers, etc.

What\'s the best

相关标签:
2条回答
  • 2021-02-15 11:54

    Since you're using this for settings, have you considered InAppSettingsKit?

    In cases where that may be overkill, I have resorted to creating a static tableview in a storyboard where I can layout each distinct setting and have design-time control over its appearance.

    0 讨论(0)
  • 2021-02-15 12:03

    I don't like the idea that I have to debug someone else's code if incase i didn't like something in it. That's why I try to write code on my own and then see if it fits my needs or not. If it doesn't then I would go and take a look at InAppSettingsKit.

    What you have asked for is a very simple stuff and I have implemented in almost every app of mine i.e. UITableView with options.

    this is how I would do it. You can do all this straight up in xcode.

    • Create a UITableView Controller
    • Make it a navigation controller. So that you can add heading on it like with word "settings"
    • Change it to static cells
    • Then change it to grouped cells
    • Create as many groups as you need
    • For each cell add switches as needed
    • Add footer and header to each grouping
    • Add pretty pictures next to each option as you like.

    I hope this helps. Here is one of my sample project settings screenshot. You cannot see header and footer that I had created.

    enter image description here

    0 讨论(0)
提交回复
热议问题