简体   繁体   English

如何在iOS中的settings.bundle中添加按钮

[英]How add button in settings.bundle in ios

I am using settings.bundle in my iOS app but problem is how to add button in that page and handling that button. 我在我的iOS应用中使用settings.bundle,但问题是如何在该页面中添加按钮并处理该按钮。 Can any body help me on this. 任何人都可以帮我这个忙。

It's not possible. 这是不可能的。 You cant run code in setting bundle. 您无法在设置包中运行代码。 So it is useless. 因此它是没有用的。 The system only supports interacting with the values from within your app. 系统仅支持与您的应用程序中的值进行交互。

The only thing you can do there is to include a list of options. 您唯一可以做的就是包括选项列表。 There are apps like Netflix which have a kind of "action button". 像Netflix这样的应用程序具有一种“操作按钮”。 They implement a radio control (boolean) to reset their options. 他们实现了一个无线电控件(布尔值)以重置其选项。 So when the app starts again it checks for the value of the property and it deletes everything if the radio is set to yes. 因此,当应用再次启动时,它将检查属性的值,如果单选设置为“是”,则它将删除所有内容。

Apple documentation 苹果文档

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

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