-[UITableView copyWithZone:]: unrecognized selector sent to instance 0x7XXXXXX00
-[UITableView copyWithZone:]: unrecognized selector sent to instance 0x7XXXXXX00
-[Class copyWithZone:]: unrecognized selector sent to instance 0x7XXXXXX00
出现这个错误的原因是,全局的属性的修饰词写错了,
比如一个view 本来应该用weak和strong 修饰,结果你写成了copy 那么就会出现这个错误
错误:
@property (nonatomic,copy) UITableView *tableView; //tableView;
正确:
@property (nonatomic,strong) UITableView *tableView; //tableView;
下面来自外国兄台的回答给大家个参考
Your -setObj1: method is declared as copy, so it calls -copy on your Class1 object. -copy just calls -copyWithZone:nil. So you either need to implement the NSCopying protocol (which means implementing -copyWithZone:), or change your property from copy to retain.
To make your class respond to copyWithZone:, you have to implement the NSCopying protocol in your class. And you must override the copyWithZone: method.
要实现自定义对象copy,需遵守NSCopying、NSMutableCopying协议,实现copyWithZone、mutableCopyWithZone 方法
更多关于copy请看
https://blog.csdn.net/qq_25639809/article/details/80048843
-[UITableView copyWithZone:]: unrecognized selector sent to instance 0x7XXXXXX00的更多相关文章
- Solve Error: 'NSInvalidArgumentException', reason: '-[UITableView mas_makeConstraints:]: unrecognized selector sent to instance 0x7fa5c402fa00'
下面是iOS开发用第三方库可能出现的错误,及其解决方法: 1. 'NSInvalidArgumentException', reason: '-[UITableView mas_makeConstra ...
- reason: -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance
reason: -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance 发现上线的app一直会有这个cr ...
- __NSArrayI removeObjectAtIndex:]: unrecognized selector sent to instance
同样是删除cell问题,帮我看看问题出现在哪,谢谢! 我的类文件myFile是继承UIViewController的(目的是为了能够在一个view里切换不同的tableView),在myFile.h中 ...
- '-[__NSCFString stringFromMD5]: unrecognized selector sent to instance 0x14d89a50'
类型:ios 问题描述: 导入百度地图 然后在模拟器运行可以,真机测试不行: 报错: '-[__NSCFString stringFromMD5]: unrecognized selector sen ...
- unrecognized selector sent to instance
今天长一见识(特此感谢小星星老湿-坏笑),凡是遇到“unrecognized selector sent to instance *******”的都是******方法没有,比如这种的错误: 可以尝试 ...
- IOS 错误 [UIWebView cut:]: unrecognized selector sent to instance
那在什么场景中会出现这种情况呢? 如果一个包含文字的输入元素有焦点,然后按钮的点击会导致输入失去焦点,然后接下来在输入时双按会重新得到焦点并从弹出bar中选择剪切复制粘贴,就会导致此error. 也就 ...
- iOS 程序报错:reason: [NSArrayI addObject:]: unrecognized selector sent to instance
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI ad ...
- -[__NSCFNumber length]: unrecognized selector sent to instance 0xb0000000000000e3
网络数据解析出现-[__NSCFNumber length]: unrecognized selector sent to instance 0xb0000000000000e3这样的错误,具体 re ...
- CBUUID UUIDString unrecognized selector sent to instance 错误
CBUUID UUIDString unrecognized selector sent to instance 错误 ios7.0,4s 蓝牙出现上述错误! 查看api可知,错误原因,由于CBUUI ...
随机推荐
- Charles弱网测试转载
一.破解版安装 工具好用是好用,但有个蛋疼的地方,非开源,非开源也就算了,还来个试用30分钟,当时的我就中这招了, 试用了之后发现这工具确实好用,对于测试工程师来说兼抓包定位协议类bug.设置网络阀来 ...
- (九)Kubernetes 存储卷
Kubernetes存储卷概述 Pod本身具有生命周期,这就带了一系列的问题,第一,当一个容器损坏之后,kubelet会重启这个容器,但是文件会丢失-这个容器会是一个全新的状态:第二,当很多容器在同一 ...
- 生产环境碰到系统CPU飙高和频繁GC系统反应慢,你要怎么排查?(转)
处理过线上问题的同学基本上都会遇到系统突然运行缓慢,CPU 100%,以及Full GC次数过多的问题.当然,这些问题的最终导致的直观现象就是系统运行缓慢,并且有大量的报警.本文主要针对系统运行缓慢这 ...
- centos7 增加开放端口
添加 firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent永久生效,没有此参数重启后失效) 重新载入 不然不生效 ...
- 剑指Offer(十七):树的子结构
剑指Offer(十七):树的子结构 搜索微信公众号:'AI-ming3526'或者'计算机视觉这件小事' 获取更多算法.机器学习干货 csdn:https://blog.csdn.net/baidu_ ...
- 性能测试基础---LR运行设置
·LR的运行时设置(Runtime settings): ·Run Logic:该选项是用来控制脚本的真正的运行逻辑. ·该选项会把脚本中的函数分别放入三个运行模块中:Init.Run.End ·默认 ...
- 项目Beta冲刺--4/7
项目Beta冲刺--4/7 作业要求 这个作业属于哪个课程 软件工程1916-W(福州大学) 这个作业要求在哪里 项目Beta冲刺 团队名称 基于云的胜利冲锋队 项目名称 云评:高校学生成绩综合评估及 ...
- 爬虫-requests用法
中文文档 API: http://requests.kennethreitz.org/zh_CN/latest/ 安装 pip install requests 获取网页 # coding=utf-8 ...
- Linux中的磁盘练习
查看磁盘接口类型 ide dh[a-z] scsi sd[a-z] 添加磁盘 先添加一个磁盘 cd /dev/ ls sd* 可以看到先添加的磁盘 磁盘分区 .fdisk /dev/sdb n (添加 ...
- input type=file实现图片上传
<label for="file"> <img src="images/morende.jpg" alt=""> & ...