今天在优化app时,发现程序出现这种警告:“

Presenting view controllers on detached view controllers is discouraged <CallViewController: 0x14676e240>.

首先说明一下,我是在判断无网络时,要弹出一个提示框时出现的这个问题

在网上查资料时,又说是当前控制器已present一个视图,再present一个视图时,就会出现这个错误。但是在我的项目中当前页面根本就没有第二个present了,因此也就不存在present多个视图了。通过摸索,我是这样解决问题的:

将present操作放在线程中执行就OK了。

不过,,问题虽然解决了,但是我却并不知道这是什么原因导致的,按理说不将present操作放在线程中也对啊,因为之前是没有present操作的,我很是纠结,希望有解决此问题、并看到我此次小结的大神知道一番!

Presenting view controllers on detached view controllers is discouraged <CallViewController: 0x14676e240>.的更多相关文章

  1. Presenting view controllers on detached view controllers is discouraged

    本文转载至 http://www.xuebuyuan.com/2117943.html Presenting view controllers on detached view controllers ...

  2. iOS错误之-Presenting view controllers on detached view controllers is discouraged

    遇到这个警告后找了一下网络资源,基本上只说通过 [self.view.window.rootViewController presentViewController:controller animat ...

  3. xocde8打印出:Presenting view controllers on detached view controllers is discouraged

    原因: 是某个viewController的生命周期控制出现了错误,所以尽量避免一个controller的view去addsubview另一个controller的view,这样会破坏层级关系,导致第 ...

  4. iOS Programming Autorotation, Popover Controllers, and Modal View Controllers

    iOS Programming Autorotation, Popover Controllers, and Modal View Controllers  自动旋转,Popover 控制器,Moda ...

  5. 创建控制器的方法、控制器加载view过程、控制器view的生命周期、多控制器组合

    在介绍四大对象的那篇博客中,可以基本了解到程序启动的过程: main-->UIApplicationMain-->创建UIApplication的实例和app代理AppDelegate的实 ...

  6. 获取View的截图-将View转换为Bitmap对象

    开发中,有时候需要获取View的截图来做动画来达到动画流程的目的 原理:将View的内容画到一个Bitmap画布上,然后取出 下面封装了一个从View生成Bitmap的工具类 /** * 将View转 ...

  7. The method onClick(View) of type new View.OnClickListener(){} must override a superclass

    最近在做一个jWebSocket Android客户端的Demo时遇到如下错误: ok —————— 最近在做一个jWebSocket Android客户端的Demo时遇到如下错误: ".. ...

  8. (转)Qt Model/View 学习笔记 (五)——View 类

    Qt Model/View 学习笔记 (五) View 类 概念 在model/view架构中,view从model中获得数据项然后显示给用户.数据显示的方式不必与model提供的表示方式相同,可以与 ...

  9. onClick(View) of type new View.OnClickListener(){} must override a superclass method

    原地址:http://blog.csdn.net/aeolus1019/article/details/8014798 Android开发过程中代码错误报错如下: - implements andro ...

随机推荐

  1. 27 个免费的 HTML5/CSS3 模板供下载

    EscapEvelocity Responsive Html5 Theme ( Demo || Download) Base 2013 Responsive Html5 Theme (Demo || ...

  2. 你必须知道ASP.NET知识------从IIS到httpmodule(第一篇)

    一.写在前面 最近有时间,顺便将这系列洗完,接着上文:IIS各个版本知识总结 这篇文章原本计划写到HttpHandler为止,但限于篇幅就写到httpmodule 本文有不足之处,求指正,希望我能将它 ...

  3. 利用Navigation Timing测量页面加载时间

    最近在看一本名为<web性能实践日志>的书籍,其中第十三章"网络计时"中介绍了一种比较新的计算页面各部分加载时间方法,这也是W3C Web性能工作小组正在做的事情,接下 ...

  4. C++ - unordered_map 源码解析

    转自:http://zrj.me/archives/1248,转载请注明.(分析得不错) 主要尝试回答下面几个问题: 一般情况下,使用 hash 结构,需要有桶的概念,那么 unordered_map ...

  5. Stream Player control

    In this article you will find an implementation of a stream player control. Download WPF demo - 11 M ...

  6. 重构:用Command替换条件调度程序

    注:该随笔受启发于 <重构与模式>  第七章 第7.6小节 用Command替换条件调度程序 . 对于Command不做过多解释,这里我找了两个例子.供部分园友参阅:Command例子1  ...

  7. 在Windows Phone 8中使用Live Connect并保持登陆状态

    Live Connect可以让各种客户端访问Live账号.获取好友列表.访问One Drive的文件等,官方地址在此:http://msdn.microsoft.com/zh-cn/live/ff51 ...

  8. iOS 基础控件(下)

    上篇介绍了UIButton.UILabel.UIImageView和UITextField,这篇就简短一点介绍UIScrollView和UIAlertView. UIScrollView 顾名思义也知 ...

  9. html初始化页面和a标签无下划线

    body, div, p, h1, h2, h3, h4, h5, h6, ul, ol, li, dl, dd, dt, img, form { padding:0px; margin:0px; b ...

  10. 使用attrs.xml自定义属性

    控件有很多属性,如android:id.android:layout_width.android:layout_height等,但是这些属性都是系统自带的属性.使用attrs.xml文件,可以自己定义 ...