关于unrecognized selector sent to instanc
来源:互联网 发布:nokia5300软件下载 编辑:程序博客网 时间:2024/05/19 19:13
今天遇到个问题颇是拖延了点时间,错误报错如下:
[UIAccessibilityBundle setStrName:]: unrecognized selector sent to instance 0x6891180
错误指向语句是一个strName的赋值语句
这个错误之所以费了时间,原因在于我定位错误的时候错误的将该错误定位为方法或者属性未定义,但是我看上面定义的类型里明明却是是写过了这个属性,为什么会无法执行呢?
顺次向上推敲代码,找到这样一行代码
CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CustomCellIdentifier"];
也就是寻找identifier被设置为了CustomCellIdentifier的object
查看dequeueReusableCellWithIdentifier方法的说明,在Return Value里的说明为
A UITableViewCellobject with the associated identifier or nil if no such object exists in the reusable-cell queue.
换句话说,它只是找到并且返回同样的identifier的队列成员中的一个!
反复整个工程查找定位CustomCellIdentifier,发现有两个table view cell的identifier都被定义为了CustomCellIdentifier,但是系统未给出过警告或者相关信息,由此返回了另一个identifier值导致找到了错误的结果
尚未找到确切的方法检测应用是否有相同的identifier存在,所以这里只能多加细心,待以后找到了方法之后再来补充
- 关于unrecognized selector sent to instanc
- 新浪微博SDK出现导致app崩溃 '-[__NSDictionaryM weibosdk_WBSDKJSONString]: unrecognized selector sent to instanc
- ShareSDK集成报错:NSConcreteMutableData wbsdk_base64EncodedString]: unrecognized selector sent to instanc
- unrecognized selector sent to
- unrecognized selector sent to instance
- unrecognized selector sent to class
- unrecognized selector sent to instance
- unrecognized selector sent to instance
- unrecognized selector sent to class
- unrecognized selector sent to instance
- unrecognized selector sent to instance
- unrecognized selector sent to class
- unrecognized selector sent to instance
- unrecognized selector sent to instance
- unrecognized selector sent to instance
- unrecognized selector sent to instance
- unrecognized selector sent to instance
- unrecognized selector sent to instance
- 黑马程序员-SQL语句基础知识
- Android中的部分笔记
- 在Drupal当中,如何实现系统集成?
- 被逼写篇论文,扯蛋
- 黑马程序员-SQL语言 基础知识
- 关于unrecognized selector sent to instanc
- 黑马程序员-SQL语言 基础知识
- 线程内Socket被动关闭导致程序异常问题
- MSP430的时钟
- 编译rt61apd遇到的问题
- anroid主题更换详解
- JS 数组操作的方法--COPY
- 从最小二乘到最大似然再到最大后验(PRML读书笔记)
- [C编程在Linux上]用printf做彩色日志记录