[英]Is there a way to reboot an iOS app?
I am pretty new to iOS and was wondering if there was a way to restart an app. 我是iOS新手,想知道是否有办法重启应用程序。 Essentially when you reach the end of the app it gives you the option of restarting the whole app.
基本上,当您到达应用程序的末尾时,它为您提供了重新启动整个应用程序的选项。 The instances are reset along with everything else.
实例将与其他所有内容一起重置。 I could go back to the first screen and reset instances manually, but I was wondering if there was a way I could have the app restart or reboot itself.
我可以回到第一个屏幕并手动重置实例,但我想知道是否有一种方法可以让应用程序重启或重新启动。
Are you familiar with the Model-View-Controller design pattern? 您熟悉模型 - 视图 - 控制器设计模式吗? You should have your application data stored in a model object.
您应该将应用程序数据存储在模型对象中。 When the user "gets to the end", you can reset the model and update your views to start over.
当用户“到达终点”时,您可以重置模型并更新您的视图以重新开始。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.