今天在点击按钮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)的更多相关文章

  1. iOS 因为reason: 'Pushing the same view controller instance more than once is not supported而奔溃(下)

    这个问题是什么意思呢,之前遇到过几次,但程序再次打开时没有问题,也就没有重视,今天又遇到了,无法忍受啊. 控制台报的错误是:"不支持多次推入相同的视图控制器实例". 什么原因造成的 ...

  2. iOS 因为reason: 'Pushing the same view controller instance more than once is not supported而奔溃(上)

    这个问题是什么意思呢,之前遇到过几次,但程序再次打开时没有问题,也就没有重视,今天又遇到了,无法忍受啊. 控制台报的错误是:"不支持多次推入相同的视图控制器实例". 什么原因造成的 ...

  3. Xcode6中segue取消原push与modal(deprecated)

    xcode6 之后push 和modal 就被废弃了.只能用于ios8之前.在拖线的时候我们就可以看见. 这两个方法被废弃了,我们需要找到合适的方法来代替,这时候我们发现 show 和Present ...

  4. [转]application windows are expected to have a root view controller错误

    转载地址:http://blog.sina.com.cn/s/blog_6784e6ea01017jfy.html 最新更正:这个提示几乎不影响编译和运行,可以不用设置.     产生这个提示的操作: ...

  5. application windows are expected to have a root view controller错误

    产生这个提示的操作:在xcode4.6中创建一个名字为appTest空工程,create一个ios-application-empty application,直接编译运行 错误提示:虽然编译通过,也 ...

  6. 错误的语法:"create view必须是批处理中仅有的语句"

    编写脚本提示: 错误的语法:"create view必须是批处理中仅有的语句" FROM sys.views WHERE name = 'v_CS_UserRoleNames' ) ...

  7. 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 ...

  8. git push origin master错误

    以下错误是因为远程有的文件,本地没有,故而无法push文件到远程 $ git push origin master To git@github.com:AntonioSu/learngitWindow ...

  9. git push 时发生错误 error: src refspec master does not match any. error: failed to push some refs to

    很多相关解决办法都是最后要 push 到远端的 master 上,但很多其实要求不能把个人的修改内容直接 push 到 master 主分支. 因此,当我想将本地 feature/work1 分支的修 ...

随机推荐

  1. 以不同用户身份运行程序,/savecred只需要输入一次密码(GetTokenByName取得EXPLORER.EXE的令牌,然后调用CreateProcessAsUser,而且使用LoadUserProfile解决另存文件的问题)good

    http://blog.sina.com.cn/s/blog_65977dde0100s7tm.html ----------------------------------------------- ...

  2. ASCII是指128个字符(不是256个)和ASCII Extended Characters(就是那些奇怪的外文字符)

    ASCII第一次以规范标准的型态发表是在1967年,最后一次更新则是在1986年,至今为止共定义了128个字元:其中33个字元无法显示(一些终端提供了扩展,使得这些字符可显示为诸如笑脸.扑克牌花式等8 ...

  3. chage命令管理用户口令时效

    http://zhumeng8337797.blog.163.com/blog/static/1007689142011824102827487/ http://www.th7.cn/system/l ...

  4. bzoj1221

    网络流与线性规划24题中的餐巾计划吧明显要拆点吧,把每一天拆成2个点,i,i+n起点   终点    容量    费用 s      i      inf      c    每天都可以购买新毛巾 i ...

  5. 数学(线性规划):UVAoj 10498 Happiness

    Problem GHappiness! Input: standard inputOutput: standard outputTime Limit: 3 seconds Prof. Kaykobad ...

  6. cf601A The Two Routes

    A. The Two Routes time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  7. android画虚线的自定义VIew

    package com.yesway.ycarplus.view; import android.annotation.SuppressLint; import android.content.Con ...

  8. 通过web修改svn用户密码

    使用方法: 将文件changePasswd.cgi和changePasswd.ini 放到apche安装目录下的cgi-bin下(cgi-bin的目录可以通过/etc/httpd/conf/httpd ...

  9. [Locked] Meeting Room I && II

    Meeting Room Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2 ...

  10. Web 测试笔记

    测试难点 主要是模块之间的同步问题. 测试容易忽略的地方 1. 各种标题.包括页面“标签页”的标题,弹出框的标题.由于开发经常直接用之前的页面,比如编辑可能直接用新增的页面,导致标题出错. 2. 最大 ...