在iOS中终止后如何在打开应用程序时重新打开上一个视图 [英] How to reopen last view while open the app after terminating in iOS

查看:72
本文介绍了在iOS中终止后如何在打开应用程序时重新打开上一个视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iOS应用程序开发的新手,因此对iOS开发中可用的资源没有任何特殊的想法. 我想如果我在特定视图上,然后突然单击主页"按钮终止了该应用程序,那么当我再次打开该应用程序时,它应该打开终止该应用程序时的上一页.由于该应用未终止,因此它处于后台.

I am very new in iOS application development so don't have any special idea about the resources available in iOS development. I want that if I am on a particular view and then I suddenly terminate the app by clicking on "Home" button, then while I open the app again, it should open the last page on which I was while terminating the app. Since the app is not terminated, it was in background.

如果故事板可以更好地描述我的问题,我可以显示其故事板的快照-

I can show the snapshot of my storyboard if it can describe my question in a better way-

在屏幕截图中,当我关闭应用程序后打开该应用程序时,如果我未登录,则在我打开该应用程序时,将打开登录"屏幕(1).如果我已登录,则(4)将打开.那是正确的.但是假设如果我在关闭应用程序之前处于(5)位置,那么它也会同时打开(4),那应该不会发生.如何控制呢?

In the screenshot, when I open the app after closing it, if I am not logged in then when I will open the app, Login screen (1) will open. And if I am logged in then (4) will open. That is correct. But suppose if I was on (5) before closing the app, then also it opens (4), that should not happen. How to control that?

如果有人对此有任何想法,请分享.

If someone have any idea about that, please share.

谢谢.

推荐答案

您可以在此处查看参考

https://developer.apple.com/videos/wwdc/2012 /?id = 208

在这里

http://useyourloaf.com/blog/2013/05/21/state-preservation-and-restoration.html

还有

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=ios%20restore%20state%20stackoverflow

这篇关于在iOS中终止后如何在打开应用程序时重新打开上一个视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆