【原】push过快的错误 (Pushing the same view controller instance more than once is not supported)
今天在点击按钮push viewController 时,控制台报错:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing the same view controller instance more than once is not supported
网上查了以下原因, 是说过快点击可能会产生多次push的情况,在MVC里是不支持这种事件的,所以,保险起见,在可能出现这种情况的push事件里,加以判断即可。
if(![self.navigationController.topViewController isKindOfClass:[currentCLASS class]]) {
参考:http://stackoverflow.com/questions/7083124/pushing-the-same-view-controller-instance-more-than-once-is-not-supported-exce
【原】push过快的错误 (Pushing the same view controller instance more than once is not supported)的更多相关文章
- iOS 因为reason: 'Pushing the same view controller instance more than once is not supported而奔溃(下)
这个问题是什么意思呢,之前遇到过几次,但程序再次打开时没有问题,也就没有重视,今天又遇到了,无法忍受啊. 控制台报的错误是:"不支持多次推入相同的视图控制器实例". 什么原因造成的 ...
- iOS 因为reason: 'Pushing the same view controller instance more than once is not supported而奔溃(上)
这个问题是什么意思呢,之前遇到过几次,但程序再次打开时没有问题,也就没有重视,今天又遇到了,无法忍受啊. 控制台报的错误是:"不支持多次推入相同的视图控制器实例". 什么原因造成的 ...
- Xcode6中segue取消原push与modal(deprecated)
xcode6 之后push 和modal 就被废弃了.只能用于ios8之前.在拖线的时候我们就可以看见. 这两个方法被废弃了,我们需要找到合适的方法来代替,这时候我们发现 show 和Present ...
- [转]application windows are expected to have a root view controller错误
转载地址:http://blog.sina.com.cn/s/blog_6784e6ea01017jfy.html 最新更正:这个提示几乎不影响编译和运行,可以不用设置. 产生这个提示的操作: ...
- application windows are expected to have a root view controller错误
产生这个提示的操作:在xcode4.6中创建一个名字为appTest空工程,create一个ios-application-empty application,直接编译运行 错误提示:虽然编译通过,也 ...
- 错误的语法:"create view必须是批处理中仅有的语句"
编写脚本提示: 错误的语法:"create view必须是批处理中仅有的语句" FROM sys.views WHERE name = 'v_CS_UserRoleNames' ) ...
- eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass method 在做arcgis android开发的时候,突然遇到这种错误,The method onClick(View) of type new View.OnClickListener(){} mus
eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass met ...
- git push origin master错误
以下错误是因为远程有的文件,本地没有,故而无法push文件到远程 $ git push origin master To git@github.com:AntonioSu/learngitWindow ...
- git push 时发生错误 error: src refspec master does not match any. error: failed to push some refs to
很多相关解决办法都是最后要 push 到远端的 master 上,但很多其实要求不能把个人的修改内容直接 push 到 master 主分支. 因此,当我想将本地 feature/work1 分支的修 ...
随机推荐
- 获取Delphi所有类的类信息
Delphi遍历进程中所有Class的TypeInfo,即便是在implementation中的class或者其他 class的private的子class. 一般普通EXE中的TypeInfo存放在 ...
- java的"=="与"equals"
equals 方法是 java.lang.Object 类的方法. 有两种用法说明: (1)对于字符串变量来说,使用“==”和“equals()”方法比较字符串时,其比较方法不同. “==”比较两个变 ...
- Linux目录树
Linux目录树(directory tree) 分层结构(不同于数据库文件系统),单个文件/目录的最大长度为255个字符,完整路径为4096个字符 特殊的文件系统 文件系统 挂载点 说明 Root ...
- AOE网上的关键路径(最长路径 + 打印路径)
题目描述 一个无环的有向图称为无环图(Directed Acyclic Graph),简称DAG图. AOE(Activity On Edge)网:顾名思义,用边表示活动的网,当然它也是DAG ...
- 【图论】【宽搜】【染色】NCPC 2014 A Ades
题目链接: http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1787 题目大意: N个点M条无向边(N,M<=200000),一个节点只能有一个 ...
- supesite 相关 修改
1.修改 站点名称及logo http://faq.comsenz.com/viewnews-594 2.supesite 如何 收录论坛 http://faq.comsenz.com/viewnew ...
- kafka-简单事例
开始创建项目,这里所用的工程结构是maven. 在pox.xml中添加kafka的依赖包,如下所示: <dependency> <groupId>org.apache.kafk ...
- JavaScript中的加号
JavaScript中的加号“+”可以作为数学运算符的加,也可以作为字符串拼接,也可以作为一元运算符,表示正数. 1+2 "2"+"3" 3+"2&q ...
- 编写Lex和Yacc
大学课程设计中,有一次是编写Lex(词法分析器的生成器)和Yacc(语法分析器的生成器),编写这类工具软件不是一件容易的事情.这篇文章记录了当时编程时候的主要思想,主要还是编译原理的思想. 准备 Le ...
- Rational Rose与UML教程
在学UML的过程中,Rational Rose的角色无比重要.现在能找到的大多数是2003的,但下面连接是2007. http://blog.csdn.net/skl_TZ/article/detai ...