How to add a button to the iPhone settings page?

In the Settings app, the Safari settings page contains buttons that say "Clear History" or "Clear Cache." The mail application settings page contains a large red button "Delete account".

Is there any way to create such a settings page with buttons for my application? I checked the Apple documentation and did not find the item type for such buttons.

+1
source share
2 answers

Unfortunately, it seems to me that you are out of luck - if you are not a jailbreak. To create a settings page for your application, you create a plist, not the actual encoding of the view. This leads to certain restrictions, such as the inability to add a button. The only thing you cannot do is execute any code from the Settings application - all you can do is change the set of settings.

Closest to all, you can add a radio button labeled "Clear history on next start" and check if the user is installed each time the application starts. Then set the settings so that the switch is set to Off.

+5
source

AppStore applications - you cannot. Even if you can add a button, no code can be run, making it useless.


Jailbroken apps - use the PreferenceBundle and create the PSButtonCell . See http://www.iphonedevwiki.net/index.php?title=Preferences_specifier_plist .

+1
source

All Articles