错误的原因:

*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<UICompatibilityInputViewController: 0x7fe168592d00> should have parent view controller:<WDKRichChatViewController: 0x7fe1686655b0> but requested parent is:<UIInputWindowController: 0x7fe168852a00>'

情景复现:

  当我给cell添加长按手势的时候,要实现UIMenuController,但是蹦到了 [self becomeFirstResponder]  这一句,翻阅了各种百度,终于知道了原因:

Your view controller probably has a property named inputView that is merely a subview, not an inputView as UIResponder interface expects it to be.

Starting with iOS 8 they check that UIResponder's inputView has no parent.

这是百度出来的,于是按照这个方向去找,发现我的控制器添加上了这句:

@property (nonatomic, strong) ChatInputPanel *inputView;  于是,注释了,便好了。

附上提供思路的链接地址:http://stackoverflow.com/questions/26928849/error-when-try-becomefirstresponder-call-for-uimenucontroller

cell长按出错的更多相关文章

  1. CollectionView的cell长按事件实现

    原生cell没有长按事件,我们需要使用手势识别来绑定CollectionView.创建并绑定CollectionView如下: (void)viewDidLoad { [super viewDidLo ...

  2. python之协程与IO操作

    协程 协程,又称微线程,纤程.英文名Coroutine. 协程的概念很早就提出来了,但直到最近几年才在某些语言(如Lua)中得到广泛应用. 子程序,或者称为函数,在所有语言中都是层级调用,比如A调用B ...

  3. JQuery笔记汇总

    jQuery相关资料 官网: jQuery官网 在线API: jQuery在线API W3School:W3School-jQuery教程(中文版哦) 下载jQuery:jQuery各版本下载 jQu ...

  4. Git工作流总结

    引用自:https://github.com/xirong/my-git/blob/master/git-workflow-tutorial.md 说明: 个人在学习Git工作流的过程中,从原有的 S ...

  5. 实现UITableView循环利用

    tableViewUITableView循环利用 前言 大家都知道UITableView,最经典在于循环利用,这里我自己模仿UITableView循环利用,写了一套自己的TableView实现方案,希 ...

  6. IOS彩票第二天设置界面(2)

    *********代码的抽取ILBaseTableViewController.h #import <UIKit/UIKit.h> @interface ILBaseTableViewCo ...

  7. [转]深入理解学习GIT工作流

    深入理解学习Git工作流 字数13437 阅读2761 评论3 喜欢70 个人在学习git工作流的过程中,从原有的 SVN 模式很难完全理解git的协作模式,直到有一天我看到了下面的文章,好多遗留在心 ...

  8. IOS开发UI基础UITableView的属性

    UITableView UITableView内置了两种样式:UITableViewStylePlain,UITableViewStyleGrouped <UITableViewDataSour ...

  9. Git工作流指南:集中式工作流

    转载:http://blog.jobbole.com/76847/ 本文由 伯乐在线 - 李鼎 翻译.未经许可,禁止转载!英文出处:atlassian.欢迎加入翻译组. 转到分布式版本控制系统看起来像 ...

随机推荐

  1. Linux下目标文件分析

    文章来源:华清远见嵌入式学院,原文地址:http://www.embedu.org/Column/Column699.htm 作者:冯老师,华清远见嵌入式学院讲师. 1. 程序源码如下: 2.命令 g ...

  2. Java_CookieUtil

    package com.willow.util; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequ ...

  3. php by oneself

    在php里面写html代码真的很麻烦,最近学到了一个新的方法: <html> <head> <title>PHP</title> <meta ht ...

  4. signal(SIGPIPE, SIG_IGN)

    文章来源:http://blog.163.com/niuxiangshan@126/blog/static/170596595201221942952676/   当服务器close一个连接时,若cl ...

  5. [LintCode] Continuous Subarray Sum 连续子数组之和

    Given an integer array, find a continuous subarray where the sum of numbers is the biggest. Your cod ...

  6. [CareerCup] 16.6 Synchronized Method 同步方法

    16.6 You are given a class with synchronized method A and a normal method B. If you have two threads ...

  7. Eclipse上的项目分享到GitHub

    1. 右击项目:team --> Share Project 2. 在弹出的选择框中选择 Git ,点击Next 3. Configure Git Repository 按照下图选择,点击Fin ...

  8. php date()获取的时间不对解决办法

    因为php默认获取的是格林威治时间,与北京时间相差8小时. 我们要获取到北京时间有两个办法: 1.修改php.ini配置文件: 打开php.ini文件,一般在php配置根目录下,找到其中的 ;date ...

  9. centos6 LVS-DR模式---分析

    LVS是什么就不多说了. 先上拓扑图 1台LVS   3台Realserver    一个客户端.  环境全部模拟全在内网环境(selinux和iptables关闭) 先简略说一下安装步骤: LVS上 ...

  10. ping过程

    premise: 一个局域网内,网段为192.168.0.0 , 有两台主机A(192.168.0.3) 主机B(192.168.0.4) 1. A 机器上执行: ping 192.168.0.4 2 ...