问题
How can I create a "button" in Settings bundle? Something like "Import SIM Contacts" inside Mail settings? Or "Reset Calibration" in Nike + iPod application?
Need to have a "Reset Username and Password" button for Settings, if that is a special case... I mean how can I add logic to clear some of other settings, while my own app is not running?
回答1:
You can't run custom code in settings, so this is commonly solved with an on/off switch to reset settings at next launch.
When the app launches, check if it has been switched to on, and perform the reset in your application run-time.
来源:https://stackoverflow.com/questions/3959149/how-to-create-reset-button-in-iphone-settings