-[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的更多相关文章

  1. Solve Error: 'NSInvalidArgumentException', reason: '-[UITableView mas_makeConstraints:]: unrecognized selector sent to instance 0x7fa5c402fa00'

    下面是iOS开发用第三方库可能出现的错误,及其解决方法: 1. 'NSInvalidArgumentException', reason: '-[UITableView mas_makeConstra ...

  2. reason: -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance

    reason: -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance 发现上线的app一直会有这个cr ...

  3. __NSArrayI removeObjectAtIndex:]: unrecognized selector sent to instance

    同样是删除cell问题,帮我看看问题出现在哪,谢谢! 我的类文件myFile是继承UIViewController的(目的是为了能够在一个view里切换不同的tableView),在myFile.h中 ...

  4. '-[__NSCFString stringFromMD5]: unrecognized selector sent to instance 0x14d89a50'

    类型:ios 问题描述: 导入百度地图 然后在模拟器运行可以,真机测试不行: 报错: '-[__NSCFString stringFromMD5]: unrecognized selector sen ...

  5. unrecognized selector sent to instance

    今天长一见识(特此感谢小星星老湿-坏笑),凡是遇到“unrecognized selector sent to instance *******”的都是******方法没有,比如这种的错误: 可以尝试 ...

  6. IOS 错误 [UIWebView cut:]: unrecognized selector sent to instance

    那在什么场景中会出现这种情况呢? 如果一个包含文字的输入元素有焦点,然后按钮的点击会导致输入失去焦点,然后接下来在输入时双按会重新得到焦点并从弹出bar中选择剪切复制粘贴,就会导致此error. 也就 ...

  7. iOS 程序报错:reason: [NSArrayI addObject:]: unrecognized selector sent to instance

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI ad ...

  8. -[__NSCFNumber length]: unrecognized selector sent to instance 0xb0000000000000e3

    网络数据解析出现-[__NSCFNumber length]: unrecognized selector sent to instance 0xb0000000000000e3这样的错误,具体 re ...

  9. CBUUID UUIDString unrecognized selector sent to instance 错误

    CBUUID UUIDString unrecognized selector sent to instance 错误 ios7.0,4s 蓝牙出现上述错误! 查看api可知,错误原因,由于CBUUI ...

随机推荐

  1. YUM方法安装mysql5.7版本

      版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/kabolee/article/deta ...

  2. postgresql怎么导入数据库

    1.切换到postgres用户 : sudo su - postgres 2.在shell命令行下,创建数据库exampledb,并指定所有者为dbuser : sudo -u postgres  - ...

  3. NumPy 之 案例(随机漫步)

    import numpy as np The numpy.random module supplements(补充) the built-in Python random with functions ...

  4. pecl安装php扩展

    Pecl全称The PHP Extension Community Library,php社区扩展库,由社区编写,维护. 使用pecl方便之处在于我们不用到处找源码包下载编译,配置,不用手动phpiz ...

  5. SpringCloud2.0 Feign 服务发现 基础教程(五)

    1.启动[服务中心]集群,即 Eureka Server 参考 SpringCloud2.0 Eureka Server 服务中心 基础教程(二) 2.启动[服务提供者]集群,即 Eureka Cli ...

  6. 最长上生子序列LIS

    学习动态规划问题(DP问题)中,其中有一个知识点叫最长上升子序列(longest  increasing subsequence),也可以叫最长非降序子序列,简称LIS.简单说一下自己的心得. 我们都 ...

  7. Fire Balls 03—— 多个圆环以及圆环的变速变向

    版权申明: 本文原创首发于以下网站: 博客园『优梦创客』的空间:https://www.cnblogs.com/raymondking123 优梦创客的官方博客:https://91make.top ...

  8. Django bootstrap按钮点击后激活active

    现在有个需求,就是在导航栏上有若干个按钮,我想实现的功能是当点击某个按钮后修改文字颜色,这样网站会更人性化.现总结方法如下: index.html: <ul class="navbar ...

  9. 项目Beta冲刺(团队) —— 总结

    所属课程 软件工程1916|W(福州大学) 作业要求 Beta冲刺--总结篇 团队名称 待就业六人组 后端源码 Github地址 APP源码 Github地址 在线评审表 腾讯文档地址 Beta版本A ...

  10. scala简单的功能实现~weekone

    以下是scala简单的入门题~ 1.⼀个数字如果为正数,则它的signum为1:如果是负数,怎么signum为-1:如果是0,则signum 为0.编写⼀个函数来计算这个值. object Test ...