cell长按出错
错误的原因:
*** 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长按出错的更多相关文章
- CollectionView的cell长按事件实现
原生cell没有长按事件,我们需要使用手势识别来绑定CollectionView.创建并绑定CollectionView如下: (void)viewDidLoad { [super viewDidLo ...
- python之协程与IO操作
协程 协程,又称微线程,纤程.英文名Coroutine. 协程的概念很早就提出来了,但直到最近几年才在某些语言(如Lua)中得到广泛应用. 子程序,或者称为函数,在所有语言中都是层级调用,比如A调用B ...
- JQuery笔记汇总
jQuery相关资料 官网: jQuery官网 在线API: jQuery在线API W3School:W3School-jQuery教程(中文版哦) 下载jQuery:jQuery各版本下载 jQu ...
- Git工作流总结
引用自:https://github.com/xirong/my-git/blob/master/git-workflow-tutorial.md 说明: 个人在学习Git工作流的过程中,从原有的 S ...
- 实现UITableView循环利用
tableViewUITableView循环利用 前言 大家都知道UITableView,最经典在于循环利用,这里我自己模仿UITableView循环利用,写了一套自己的TableView实现方案,希 ...
- IOS彩票第二天设置界面(2)
*********代码的抽取ILBaseTableViewController.h #import <UIKit/UIKit.h> @interface ILBaseTableViewCo ...
- [转]深入理解学习GIT工作流
深入理解学习Git工作流 字数13437 阅读2761 评论3 喜欢70 个人在学习git工作流的过程中,从原有的 SVN 模式很难完全理解git的协作模式,直到有一天我看到了下面的文章,好多遗留在心 ...
- IOS开发UI基础UITableView的属性
UITableView UITableView内置了两种样式:UITableViewStylePlain,UITableViewStyleGrouped <UITableViewDataSour ...
- Git工作流指南:集中式工作流
转载:http://blog.jobbole.com/76847/ 本文由 伯乐在线 - 李鼎 翻译.未经许可,禁止转载!英文出处:atlassian.欢迎加入翻译组. 转到分布式版本控制系统看起来像 ...
随机推荐
- Linq to Entities下存储过程的使用方法
1.首先在数据库中创建好存储过程. 2.在实体模型中添加存储过程的映射.此时根据映射过来的查询结果有两种途径:第一种可以选择添加选择的存储过程的函数到实体模型中.这样的话,查询的结果将会是xxx_re ...
- ios8 tableView设置滑动删除时 显示多个按钮
** * tableView:editActionsForRowAtIndexPath: //设置滑动删除时显示多个按钮 * UITableViewRowAction ...
- Selenium_模拟淘宝登录Demo
package com.lkb.start; import com.alibaba.fastjson.JSONObject; import com.lkb.bean.Entity; import co ...
- CentOS VirtualBox启动虚拟及报错:VirtualBox error: Kernel driver not installed (rc=1908)
VirtualBox error: Kernel driver not installed (rc=1908) Hi all, Let me first say that this is my fin ...
- zabbix3.2.0beta2 监控模版
Zabbix监控中用到了一系列模版,nginx后端检测状态 微信告警等一系列常规的服务应用监控 memcached监控模版,可以自己重新定义memcached的端口 http://files.cnbl ...
- Dependency Injection
Inversion of Control - Dependency Injection - Dependency Lookup loose coupling/maintainability/ late ...
- 四种读写方案IO流 (JAVA)
File类用于访问文件或目录的属性 流:指一连串流动的字符,是以先进先出的方式发送信息的通道.程序和数据源之间是通过流联系起来的. 第一套:字节流读取写入方案 FileInputStream :字节流 ...
- [LintCode] Candy 分糖果问题
There are N children standing in a line. Each child is assigned a rating value. You are giving candi ...
- Git基本命令行操作
A. 新建Git仓库,创建新文件夹git init B. 添加文件到git索引git add <filename> --- 单个文件添加git add * --- 全部文件添加 C. ...
- make:cc 命令未找到的解决方法
安装redis时遇到的问题 make:cc 命令未找到的解决方法 没安装gcc,然后安装 yum install gcc yum install gcc-c++