iOS后台保持(whose view is not in the window hierarchy)
来源:互联网 发布:connect佳明软件 编辑:程序博客网 时间:2024/05/21 02:51
由于应用设置的初始界面为登录界面,所以当程序进入后台挂起超过一定时间后,重新进入应用,会从登录界面重新开始。
尽管从功能上实现了后台保持的功能,然而用户显然不这么想。
之前百度到N个版本之前,某大牛曾提供这种思想,以达到启动程序时保持之前画面的功能。
- (void)applicationWillResignActive:(UIApplication *)application
{
self.window.rootViewController=nil;
}
然而经过测试,显然并没有达到预期效果,不仅如此,在iphone4S(iOS7.1)的真机上测试,还会出现黑屏的现象,并提示whose view is not in the window hierarchy!
而在iphone5C(iOS8)和iphone6+(iOS9)则不会出现黑屏现象。
想要达到UI层面上的后台保持,还需要其他的办法。
如果只想从后台切换到前台,锁定主界面,那么直接跳转就行了,或者加上登录与否的验证。
0 0
- iOS后台保持(whose view is not in the window hierarchy)
- whose view is not in the window hierarchy!
- whose view is not in the window hierarchy!
- whose view is not in the window hierarchy
- whose view is not in the window hierarchy
- whose view is not in the window hierarchy
- whose view is not in the window hierarchy
- whose view is not in the window hierarchy!
- whose view is not in the window hierarchy!
- ios开发异常:whose view is not in the window hierarchy! (20
- iOS开发出错whose view is not in the window hierarchy!的解决
- iOS开发异常warning:***whose view is not in the window hierarchy!
- IOS 开发中 Whose view is not in the window hierarchy 错误的解决办法
- [ios开发异常]whose view is not in the window hierarchy!
- [IOS开发记录]Whose view is not in the window hierarchy 错误的解决办法
- IOS Whose view is not in the window hierarchy报错
- iOS Whose view is not in the window hierarchy 错误的解决办法
- IOS 开发中 Whose view is not in the window hierarchy 错误的解决办法
- Linux下调试core dump文件的方法
- 2.WebService的开发手段
- 共享你的XMind6思维导图
- 设置div字体
- Android:EditText 多行显示及所有属性
- iOS后台保持(whose view is not in the window hierarchy)
- 风骚的Guard语法
- HDFS的快照原理和Hbase基于快照的表修复
- 在自定义View中使用自定义属性
- SQLite数据库学习笔记
- Delphi新语法 For ..In
- 【bzoj3524】【poi2014】【couriers】【可持久化线段树】
- 【Linux导论】Linux文件系统基础(Linux Filesystem Basics)
- 如何在App中实现朋友圈功能之八页面加载功能的逻辑与实现——箭扣科技Arrownock