Settings.app中的应用首选项(App preferences in Settings.app)

编程入门 行业动态 更新时间:2024-10-28 14:34:53
Settings.app中的应用首选项(App preferences in Settings.app)

我正在尝试在我的应用程序设置中实现类似于“清除历史记录”和“清除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) :)

更多推荐

本文发布于:2023-08-07 21:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465712.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:首选   app   Settings   App   preferences

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!