我正在尝试在我的应用程序设置中实现类似于“清除历史记录”和“清除Cookie”的单元格(请参见屏幕截图):
我已经实现了一些使用切换开关和多值选项的设置。
当我编辑Root.plist时,项目的唯一选项是组,多值,滑块,文本字段,标题和切换开关。 我正在尝试复制“清除历史记录”(即按一次并清除数组),它不存储任何设置或首选项,它是一次性事件。
我希望这是有道理的。 这是如何实现的?
谢谢你的帮助。
I'm trying to achieve something similar to the "Clear History" and "Clear Cookies" cells in my apps settings (see screenshot):
I already have a few settings implemented that use toggle switches and Multi Value options.
When I edit my Root.plist the only options for an item are group, multi value, slider, text field, title & toggle switch. I'm pretty much trying to replicate the "Clear History" (ie press it once and clear an array), it doesn't store any settings or preferences, it's a one off event.
I hope that makes sense. How is this achieved?
Thanks for your help.
最满意答案
暂时没有办法做到这一点,所以你必须找到另一个解决方案。
您可以简单地使用一个开关,并在每次启动应用程序时检查它并以编程方式重置开关(从iOS4开始):)
There is no way to do this (yet), so you'll have to find another solution.
You could simply use a switch and check it every time your app is started for this purpose and resetting the switch programmatically (since iOS4) :)
更多推荐
发布评论