error:assign attribute must be unsafeunretained
今天在使用协议的过程中。偶然发现这样使用
|
1
2
3
4
5
6
7
8
9
10
|
@interface id<chatdelegate> }@property@end@implementation@synthesize</chatdelegate></chatdelegate> |
会报错:
Existing instance variable 'delegate' for property 'delegate' with assign attribute must beunsafe unretained
改动成:
|
1
2
3
4
5
6
7
8
9
10
|
@interface __unsafe_unretained}@property@end@implementation@synthesize</chatdelegate></chatdelegate> |
就好了,这仅仅是为了相容iOS4下面的版本号
error:assign attribute must be unsafeunretained的更多相关文章
- non-ARC代码转 ARC 排除 “Existing instance variable 'delegate' for property with assign attribute must be _unsafe _unretained” 错误
原来非ARC代码是 @interface MHWebImageDownloader : NSObject { id<MHWebImageDownloaderDelegate> delega ...
- android在style中使用自定义属性 error: style attribute not found.
异常: Error:(128, 5) error: style attribute 'com.honghui0531.prebiotics.view:attr/item_right_icon_src' ...
- error: style attribute '@android:attr/windowEnterAnimation' not found.
在Project/gradle.properties中添加 android.enableAapt2=false
- Android Error: This attribute must be localized.
在android中使用mmm命令编译程序是出现错误. 这种问题一般情况是因为在res/xml文件夹下的中, 或者在res/layout下的文件中出现了没有多语言话的文本例. 解决方法: 不直接在布局文 ...
- System Error Codes
很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...
- winerror.h中的内容(可以查看last error对应)
/************************************************************************* ** winerror.h -- error co ...
- ios中strong, weak, assign, copy
copy 和 strong(retain) 区别 1. http://blog.csdn.net/itianyi/article/details/9018567 大部分的时候NSString的属性都是 ...
- 使用POI解析Excel时,出现org.xml.sax.SAXParseException: duplicate attribute 'o:relid'的解决办法
1.使用org.apache.poi解析excle,.xlsx类型文件InputStream is = new FileInputStream(strFileName);XSSFWorkbook wb ...
- Windows Error Codes
http://www.briandunning.com/error-codes/?source=Windows Windows Error Codes List All Error Codes | S ...
随机推荐
- ActiveMQ学习笔记(10)----ActiveMQ容错的连接
1. Failover Protocol 前面讲述的都是Client配置连接到指定的broker上,但是,如果Broker的连接失败怎么办呢?此时,Client有两个选项:要么立刻死掉,要么连接到其他 ...
- ListNode的python 实现
class Node(object): def __init__(self): self.val = None self.next = None class Node_handle(): def __ ...
- Uncaught TypeError: Cannot read property 'offsetTop' of undefined at VueComponent.handleScroll
mounted() { window.addEventListener("scroll", this.handleScroll); }, beforeDestroy() { win ...
- 模块 -logging
模块 -logging 一:在控制台显示:默认 import logging logging.debug("debug") logging.info("debug&quo ...
- iptables 配置端口及转发
iptables端口转发指令:iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443 iptables配 ...
- vue中的methods、computed和watch
1.computed属性: 经过处理返回的数据值,只要源数据没有发生改变,computed函数里面对相应的数据就不会反生改变,相当于缓存在本地;发生改变的时候,computed对应数据的函数才会发生改 ...
- python 中i++、逻辑表达式
参考链接:https://www.cnblogs.com/yupeng/p/3345946.html i++运算符 python中没有类似i++之类实现+1的运算符,但是有++i,+-i.之类的,他们 ...
- Mysql学习总结(29)——MySQL中CHAR和VARCHAR
MySQL数据库的字符(串)类不要以为字符类型就是CHAR,CHAR和VARCHAR的区别在于CHAR是固定长度,只要你定义一个字段是CHAR(10),那么不论你存储的数据是否达到了10个字节,它都要 ...
- UVA Foreign Exchange
Foreign Exchange Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Your non ...
- 【Android】资源系列(二) -- 文件原样保留的资源assets和res/raw文件夹
这两个文件夹都能够存放文件.而在打包的时候被原样保留. 那用这两个文件夹可以做什么事呢? 1.放一个apk,要用的时候调出来.免得去下载server下载. 2.放一个sql,当app数据库非常大的时候 ...