繁体   English   中英

如何在 ios 应用程序的 settings.bundle 中创建检查选项

[英]How to create Check option in settings.bundle in ios app

嗨,我想实现像 html 单选按钮行为这样的检查选项,其中一次只能选择一个选项。 我想在 ios 应用程序设置(Settings.bundle)中实现这一点。 我在任何地方都找不到一个例子,但我确实看到其他应用程序已经实现了这个。 请看下面的截图。

在此处输入图像描述

好的 PSMultiValueSpecifier 是帮助我的词。 谢谢鲁德多。

进一步添加,以便它可以帮助其他人。 您可以使用下面的 plist 代码来实现。 我从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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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