如何在iPhone设置中创建“重置"按钮 [英] How to create Reset button in iPhone Settings
问题描述
如何在设置包中创建一个按钮" ?邮件设置中的导入SIM卡联系人"之类的内容?还是Nike + iPod应用程序中的重置校准"?
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?
推荐答案
您无法在设置中运行自定义代码,因此通常可以通过使用on/off开关在下次启动时重置设置来解决此问题.
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.
这篇关于如何在iPhone设置中创建“重置"按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!