需要释放导航控制器中的所有视图
我正在尝试设置应用内购买,购买完成后我需要将应用程序重置为其初始启动状态。我想知道是否有一种方法可以释放每个导航控制器内的所有视图控制器,并重新加载应用程序启动时显示的初始视图。
提前致谢!
I'm trying to set up an in app purchase and once the purchase has been made I need to reset the app to its initial launch state. I'm wondering if there is a way to dealloc all the view controllers inside of each navigation controller and reload the initial view that is displayed when the app launches.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以
(可能有效,尽管未经测试),但是它可能更有用:
由您来跟踪导航控制器并恢复您的起始视图。
You can just
(probably works, although not tested) however it is probably more useful to use:
It is up to you to keep track of your navigation controllers, and to restore your starting view.