当 storyboard里面的 按钮 即连接了 类文件里面的点击方法  又  连接了   storyboard里 另一个  控制器的  modal

就会出现类似Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!的错误  ,意思是说系统尝试present一个没有在window的层级结构内 存在view的控制器

需要去掉一个方法,不要对一个按钮通过不同形式重复add不同的方法。这样会冲突。

Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!的更多相关文章

  1. 错误:Warning: Attempt to present <UIAlertController: 0x7fd192806e20> on <ViewController: 0x7fd1928048d0> whose view is not in the window hierarchy!

    系统:mac OS  10.12 (16A323) Xcod:8.3.3 错误:Warning: Attempt to present <UIAlertController: 0x7fd1928 ...

  2. Warning: Attempt to present A on B whose view is not in the window hierarchy!

    昨天写豆瓣发广播Demo的时候,为了写Demo的简单,就使用了Storyboard,结果执行视图跳转时遇到了这个问题: Warning: Attempt to present <UINaviga ...

  3. Warning: Attempt to present on whose view is not in the window hierarchy!

    当我想从一个VC跳转到另一个VC的时候,一般会用 - (void)presentViewController:(UIViewController *)viewControllerToPresent a ...

  4. swift一次 Attempt to present on whose view is not in the window hierarchy的解决方法

    做的是二维码扫描,扫描后识别为URL的话就跳转到webview 加载网页,用的是代理传值的方式.扫描到了 值传递到主页 扫描窗体退出,检测值是否是http://开头 是网页就跳转. 问题出在传值到主界 ...

  5. Attempt to present <vc> on <vc> which is already presenting <vc>/(null)

    在给 tableViewCell 添加长按手势弹出一个 popViewController 的时候,遇到的这个变态问题: Warning: Attempt to present <UINavig ...

  6. Warning: Attempt to present * on * which is already presenting *

    Warning: Attempt to present (要被presented的控制器)  on (哪个控制器来presenting) which is already presenting (已经 ...

  7. Warning: Attempt to present on whose view is not in模态跳转问题

    错误分析:            controller A present controller B ,前提是A的view要存在,如果不存在,就会报这个错.   解决方法:             将 ...

  8. 直接添加viewController中的view时的注意事项

    直接添加viewController中的view时需要注意一个问题,比如: MyTestViewController *vc = [MyTestViewController new]; [self.v ...

  9. 跳转时候提示Attempt to present on while a presentation is in progress

    出现这种情况,例如:我在获取相册图片后,直接present到另一个页面,但是上一个页面可能还未dismiss,所以,要在获取相册图片的dismiss方法的complete的block里面写获取图片及跳 ...

随机推荐

  1. 一份针对nginx的内核优化参数

    首先,需要修改/etc/sysctl.conf来更改内核参数.例如,最常用的配置: # ·file-max:这个参数表示进程(比如一个worker进程)可以同时打开的最大句柄数,这个参数直接限制最大并 ...

  2. centos7 编译安装php 5.6

    https://www.cnblogs.com/37yan/p/6879404.html

  3. android 换行符(\n) 在TextView中显示不正常的问题

    问题描述 在Android开发,使用TextView设置换行的时候,会有这种情况: 1.如果直接在XML文件中写入"aaaaa\nbbbb"可以换行,显示为: aaaaabbbbb ...

  4. POJ 2393 Yogurt factory【贪心】

    POJ 2393 题意: 每周可以生产牛奶,每周生产的价格为Ci,每周需要上交的牛奶量Yi,你可以选择本周生产牛奶,也可选择提前几周生产出存储在仓库中(仓库无限大,而且保质期不考虑),每一周存仓库牛奶 ...

  5. token登录验证机制图解

  6. java:合并两个排序的整数数组A和B变成一个新的数组。新数组也要有序。

    合并两个排序的整数数组A和B变成一个新的数组.新数组也要有序. 样例 1: 输入: A=[1], B=[1] 输出:[1,1] 样例解释: 返回合并后的数组. 样例 2: 输入: A=[1,2,3,4 ...

  7. Codeforces Round #310 (Div. 2)

    Problem A: 题目大意:给你一个由0,1组成的字符串,如果有相邻的0和1要消去,问你最后还剩几个字符. 写的时候不想看题意直接看样例,结果我以为是1在前0在后才行,交上去错了..后来仔细 看了 ...

  8. User Agent 设置

    感谢版主回复,版主贴的方法网上到处都是,我试了很多次都是不行的,有用的方法都几乎这个到处转贴的信息淹没了. 今天我总算在一个博客找了到可行的方法,转过来和大家分享 Windows Registry E ...

  9. Flask使用SQLAlchemy两种方式

    一.SQLAlchemy和Alembic 主要使用原生的SQLAlchemy进行数据库操作和使用Alemic进行数据库版本控制 I 创建数据库主要有三个步骤 创建表的父类/数据库连接/Session ...

  10. Django models字段查询谓词表

    谓词 含义 示例 等价SQL语句 exact 精确等于 Comment.objects.filter(id__exact=14) select * from Comment where id=14 i ...