iPhone应用程序在上次停止的地方打开
当我正在开发的应用程序启动时,用户返回到关闭前上次打开的视图。这似乎是正常行为。我可以关闭此功能以确保用户始终从登录视图开始吗?
谢谢你的建议 坦率
When the app that I'm developing is launched, the user returns at the view that was open the last time before close. This seems to be normal behaviour. Can I turn this off to make sure that the user always starts with a login view ?
thanks for your advice
Frank
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能正在运行 iOS >= 4.0。这是默认行为。要禁用,请在 Info.plist 上将
UIApplicationExitsOnSuspend
设置为 true。You are probably running on iOS >= 4.0. That is the default behavior. To disable is set
UIApplicationExitsOnSuspend
to true on your Info.plist.正如 Felz 指出的,您可以轻松禁用此功能。我建议保留它并开发另一个解决方案。如果应用程序在他们离开的地方重新打开,用户通常会很高兴。也许他们想快速查找某些内容,也许他们只是接到一个电话 - 当他们回来时,他们不想重新输入登录信息。
如果您的应用程序显示秘密信息或其他您不希望轻松访问的内容,您仍然可以实现计时器:当应用程序在后台运行一段时间(例如 5 分钟)并重新打开时,您可以再次显示您的登录屏幕。
As Felz pointed out, you can disable this easily. I would recommend though leaving it on and developing another solution. Users generally appreciate if the app reopens where they left it. Maybe they want to quickly look up something, maybe they simply get a phone call - when they come back, they don't want to reenter login information.
If your app displays secret information or something else that you don't want to be easily accessible, you could still implement a timer: When the app has been running in the background for some time, e.g. 5 minutes, and is reopened, you could display your login screen again.