简体   繁体   中英

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

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.

在此处输入图像描述

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM