系统:mac OS  10.12 (16A323)

Xcod:8.3.3

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

原因:今天写UIalerCortoller 出现此错误,查找得资料这是个经典的 错误,在往后日子里面都会遇到类似问题,这是因为弹窗视图必须在当前根控制器初始化现实后才可以执行,在viewDidLoad 方法里面还未初始化完毕导致。

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #ffffff }
span.s1 { }

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px "PingFang SC"; color: #4dbf56 }
span.s1 { }
span.s2 { font: 14.0px Menlo }

错误:Warning: Attempt to present <UIAlertController: 0x7fd192806e20> on <ViewController: 0x7fd1928048d0> whose view is not in the window hierarchy!的更多相关文章

  1. Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!

    当 storyboard里面的 按钮 即连接了 类文件里面的点击方法  又  连接了   storyboard里 另一个  控制器的  modal 就会出现类似Attempt to present & ...

  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 * which is already presenting *

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

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

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

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

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

  6. IOS 开发中 Whose view is not in the window hierarchy 错误的解决办法

    在 IOS 开发当中经常碰到 whose view is not in the window hierarchy 的错误,该错误简单的说,是由于 "ViewController" ...

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

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

  8. iOS8 iPad Warning: Attempt to present <UIImagePickerController:xxxx > on xxxx which is already presenting (null)

    解决方法: /* I think this is because in iOS 8, alert views and action sheets are actually presented view ...

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

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

随机推荐

  1. python中数字类型与处理工具

    python中的数字类型工具 python中为更高级的工作提供很多高级数字编程支持和对象,其中数字类型的完整工具包括: 1.整数与浮点型, 2.复数, 3.固定精度十进制数, 4.有理分数, 5.集合 ...

  2. HDU 6069

    Counting Divisors Problem Description In mathematics, the function d(n) denotes the number of diviso ...

  3. 一小时学会ECMAScript6新特性

    ECMAScript 简介 简称es,是一套标准,javascript就是使用这套标准的语言.主流的浏览器使用的是ECAMScript5,ECAMScript6(ECAMScript2015)是一涛新 ...

  4. Codeforces 556 A Case of the Zeros and Ones

    A. Case of the Zeros and Ones time limit per test 1 second memory limit per test 256 megabytes input ...

  5. Lettuce_webdriver 自动化测试

    这篇文章主要讲解以下几点: 1. Lettuce_webdriver环境搭建 2. lettuce_webdriver自动化实例讲解 一. lettuce_webdriver环境搭建 搭建lettuc ...

  6. 解决谷歌浏览器 chrome解决跨域(CORS)问题---chrome插件

    chrome中跨域问题解决方案 插件解决, 插件地址  https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfb ...

  7. Luogu P1451 求细胞数量

    题目描述 一矩形阵列由数字0到9组成,数字1到9代表细胞,细胞的定义为沿细胞数字上下左右若还是细胞数字则为同一细胞,求给定矩形阵列的细胞个数.(1<=m,n<=100)? 输入输出格式 输 ...

  8. UiAutomator2.0升级填坑记

    UiAutomator2.0升级填坑记 SkySeraph May. 28th 2017 Email:skyseraph00@163.com 更多精彩请直接访问SkySeraph个人站点:www.sk ...

  9. Apache Kafka系列(一)

    摘要: 1.Apache Kafka基本概念 2.Kafka的安装 3.基本工具创建Topic 本文基于centos7, Apache Kafka 0.11.0 一.基本概念 Apache Kafka ...

  10. [BZOJ 1054][HAOI 2008]移动玩具 状态压缩

    考试的时候一看是河南省选题,觉得会很难,有点不敢想正解.感觉是个状压.但是一看是十年前的题,那怂什么! 直接把十六个数的状态压进去,因为个数是不变的,所以状态枚举的时候只要找数目一样的转移即可.而且只 ...