系统: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. readelf相关命令

    -a --all 显示全部信息,等价于 -h -l -S -s -r -d -V -A -I. -h --file-header 显示elf文件开始的文件头信息. -l --program-heade ...

  2. 数据处理之pandas简单介绍

    Offical Website :http://pandas.pydata.org/ 一:两种基本的数据类型结构 Series 和 DataFrame 先来看一下Series import panda ...

  3. Backpropagation 算法的推导与直观图解

    摘要 本文是对 Andrew Ng 在 Coursera 上的机器学习课程中 Backpropagation Algorithm 一小节的延伸.文章分三个部分:第一部分给出一个简单的神经网络模型和 B ...

  4. 时间戳,取值问题 and 倒计时的前端处理

    JavaScript 获取当前时间戳: 第一种方法: var timestamp = Date.parse(new Date()); 获取的时间戳是把毫秒改成000显示, 结果:12809773300 ...

  5. 常用颜色RGB、灰度值

    128/0/0       深红         255/0/0       红           255/0/255     粉红        255/153/204 玫瑰红       153 ...

  6. 处理Oracle数据中的无效对象

    今天还原了一份数据库(在服务器上没有无效对象),还原在本地之后有三十几个无效对象,当时很是郁闷,然后我发现还原之后的数据库中缺少表! 开始我怀疑Oracle数据库的还原功能,但是在我创建表的时候发现, ...

  7. MJRefresh 使用注意点

    1.使用上拉加载更多, 当数据加载完调用[ableView.mj_footer endRefreshingWithNoMoreData]方法显示已经全部加载完毕这个方法,一定要放在[tableView ...

  8. 安卓Service完全解析(中)

    摘要: 版权声明:本文出自汪磊的博客,转载请务必注明出处. 在上一篇中我们学习了Android Service相关的许多基础但是重要的内容,基本涵盖大部分平日里的开发工作.今天我们继续学习一下稍微高级 ...

  9. 记一次小型生产事故 | BeyondComper跨编码方式复制文件内容

    前言 今天组长在做站内巡检的时候,发现header内有一条meta标签的content显示为乱码. <meta name="description" content=&quo ...

  10. 链接样式L-O-H-A

    伪类可以链接起来使用,即不用在乎顺序 :link{color:blue;} :visited{color:purple;} :link:hover{color:red;} :visited:hover ...