How to create Check option in settings.bundle in ios app

253 Views Asked by At

Hi I would like to implement check option like html radio button behavior where only one option is selectable at a time. I would like to implement this in ios app settings (Settings.bundle). I couldn't find a single example anywhere but I do see other apps have this implemented. Please see screenshot below.

enter image description here

1

There are 1 best solutions below

0
dweb On

Ok PSMultiValueSpecifier was the word that helped me. Thank you Rudedog.

To further add so it can help others. You can use below plist code to achieve. I got it from https://github.com/allanalves/Environment-Manager-iOS/blob/master/Settings.bundle/Root.plist

<dict>
            <key>Type</key>
            <string>PSGroupSpecifier</string>
            <key>Title</key>
            <string>Server</string>
            <key>FooterText</key>
            <string>Don&apos;t forget to choose the &quot;Custom URL&quot; option if you want to specify an URL above.</string>
        </dict>
        <dict>
            <key>Type</key>
            <string>PSMultiValueSpecifier</string>
            <key>Title</key>
            <string>Environment</string>
            <key>Key</key>
            <string>environment</string>
            <key>DefaultValue</key>
            <string>production</string>
            <key>Values</key>
            <array>
                <string>production</string>
                <string>homologation</string>
                <string>development</string>
                <string>custom</string>
            </array>
            <key>Titles</key>
            <array>
                <string>Production</string>
                <string>Homologation</string>
                <string>Development</string>
                <string>Custom URL</string>
            </array>
        </dict>