问题描述
只是想知道是否可以在Safari首选项中将清除历史记录,清除Cookie等按钮添加到您自己应用的设置包中?一直在挖掘开发文档,找不到按钮的任何plist说明符,所以我想知道这是否是Apple的内部API?
Just wondering if it's possible to add a button like the "Clear History", "Clear Cookies" etc buttons in the Safari preferences to your own app's settings bundle? Been digging through the dev docs and can't find any plist specifier for a button, so I'm wondering if this is an internal API for the Apple guys?
之后你按下按钮,你会得到一个动作表,询问你是否真的想要这样做,然后可能会根据用户的输入进行一些回调。
After you hit the button, you get an action sheet asking you whether you really want to do it, and then presumably there is some callback based on the user's input.
同时注意到Nike + iPod设置中有一个清晰的按钮,但同样,该应用可能可以访问我们没有的内部API。
Also noticed that the Nike + iPod settings have a clear button in them, but again, that app might have access to internal APIs that we don't.
推荐答案
不,这是不可能的。系统仅支持与应用内的值进行交互。您无法从设置应用程序运行代码,因此按钮将无用。
No, this is not possible. The system only supports interacting with the values from within your app. You can't run code from the settings app so a button would be useless.
这篇关于在iPhone prefs / settings包中添加按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!