UINavigationController出现nested push animation can result in corrupted navigation bar的错误提示
今天在測试过程中,出现了这样一个bug。分别有两种情景:
(前提是:app是基于UINavigationController构建的)
1、从Controller-A中push进来B。在B中点击返回,返回的界面为黑色一片。再做返回操作就crash了。
如图1:
2、从Controller-A中push进入B,此时B中tableview出现错位现象(图2)。tableview被navigationbar覆盖了一部分,在B中再push一个C进来。
此时仅仅显示了C的navigationbar,但下方的view还是保留为B的view(图3)。
再进行返回操作,程序crash。
如图2:
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc2luZ19zaW5n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">
图3:
崩溃后。查看控制台的log,发现这样一句话:
nested push animation can result in corrupted navigation bar
捣弄了好久,也找了资料,还是没办法解决。
后来在Controller-B中的viewdidload打印了navigationcontroller的全部压栈viewcontrollers,发如今B之前多了一个无关的viewcontroller-D,再检查代码。原来在点击A的cell的时候(didSelectRowAtIndexPath)push了一个D,但在storyboard上,对A的点击已经加了一个跳转到B的segue。正是因为同一时间push了两个controller进来,所以就会出现这种警告以及后面的奇怪错误。
将A中didSelectRowAtIndexPath位置的push代码去掉。再測试。问题全然攻克了。
纠缠了半天的bug,原来是一个小失误导致的。
因为整个项目是两个人一起做的,相互没沟通好或者没细致了解好结构就盲目写代码。终于仅仅会花费大量时间在debug上。此次教训须谨记啊。
UINavigationController出现nested push animation can result in corrupted navigation bar的错误提示的更多相关文章
- nested push animation can result in corrupted navigation bar
2013-12-06 10:15:51.668 CodingForFun[4569:70b] nested push animation can result in corrupted navigat ...
- nested pop animation can result in corrupted navigation bar
nested pop animation can result in corrupted navigation barFinishing up a navigation transition in a ...
- 转:UINavigationBar返回上一级出现nested pop animation can result in corrupted navigation bar
[self.navigationController popViewControllerAnimated:NO]; 出现上面的错误是因为pop的时候要确保先让本页面加载完成,即如果在viewDidLo ...
- Push to origin/master was rejected (Git提交错误)
[问题描述] 在使用Git Push代码的时候,会出现 Push to origin/master was rejected 的错误提示. 在第一次提交到代码仓库的时候非常容易出现,因为初始化的仓库和 ...
- Push to origin/master was rejected (Git提交错误)(转)
[问题描述] 在使用Git Push代码的时候,会出现 Push to origin/master was rejected 的错误提示. 在第一次提交到代码仓库的时候非常容易出现,因为初始化的仓库和 ...
- 使用JPA保存对象时报nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly错误
使用JPA保存对象时报nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOn ...
- git push时错误提示的解决办法 By default, updating the current branch in a non-bare repository error: is denied,
在使用git将客户端的修改push到服务器上的时候,出现无法push,提示和stackoverflow上的http://stackoverflow.com/questions/2816369/git- ...
- Swift 4.0.2 按下tab bar item时, item会有内缩的animation效果(如同Twitter的tab bar 效果一样)
先上效果图: 假设 tab bar items 有5个.tag为0,1,2,3,4.storyboard中tab bar controller继承的class叫做xxxVC. class xxxVC: ...
- Can't add self as subview的困惑
2016-05-27 09:40:43.4043 UMLOG: event: session_id=B63F36D84AD478B9F95C7D0F05DD819B, event=user_choos ...
随机推荐
- 样条之EHMT插值函数
核心代码: ////////////////////////////////////////////////////////////////////// // 埃特金插值 ////////////// ...
- 解决Keyboard遮盖输入的几种办法
一般来说,键盘遮挡主要有这么几种情况,一个是遮住UITextView,还有就是遮住UITextField,一般来说,比较推荐在UIScrollView或者UITableView里加入textfield ...
- 分布式高并发物联网(车联网-JT808协议)平台架构方案
技术支持QQ:78772895 1.车载终端网关采用mina/netty+spring架构,独立于其他应用,主要负责维护接入终端的tcp链接.上行以及下行消息的解码.编码.流量控制,黑白名单等安全控制 ...
- Sequence在Oracle中的使用
Oracle中,当需要建立一个自增字段时,需要用到sequence.sequence也可以在mysql中使用,但是有些差别,日后再补充,先把oracle中sequence的基本使用总结一下,方便日后查 ...
- 【架构】ServiceMesh初步了解
ServiceMesh初步了解 servicemesh_百度搜索 初识Service Mesh - 原力注入微信公众账号 Service Mesh解读:新一代微服务技术新秀_EAII-企业架构创新研究 ...
- HMM与分词、词性标注、命名实体识别
http://www.hankcs.com/nlp/hmm-and-segmentation-tagging-named-entity-recognition.html HMM(隐马尔可夫模型)是用来 ...
- [转]学习块格式化上下文(BlockFormattingContext)
原文:https://www.cnblogs.com/elcarim5efil/p/4745796.html 格式化上下文 格式化上下文( formatting contexts )├── 块级格 ...
- 安装QT的时候出现PATH_MAX错误
运行c:\qt\4.5.0的configure文件的时候,出现如下的错误提示: ....\corelib\io\qfsfileengine_win.cpp(1012) : error C2065: ...
- [Canvas]更多的球
欲观看动态效果请点此下载代码并用Chrome或者Firefox打开. 图例: 代码: <!DOCTYPE html> <html lang="utf-8"> ...
- [UIView setShowsFPS:]: unrecognized selector sent to instance XXX
今天在做sprite Kit game时遇到一个问题. 新建一个项目运行时发现就加了这几句代码无法运行.后来一查原来是storyboard uiview要改一下.改成SKview In your st ...