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 ...
随机推荐
- 虚拟机创建后该如何获取IP地址并访问互联网实用教程
之前在做项目的时候主机IP地址.网关.DNS.子网掩码等都是公司或者对方直接给提供的,但是如果我们自己想搭建一台虚拟机或者一台集群的话,手头又没有IP地址,该肿么办呢? 白慌,这里介绍一个小技巧, ...
- jQuery第一课 加载页面弹出一个对话框
<script type="text/javascript"> $(document).ready(function(){ alert("欢迎收看:" ...
- 6款 jQuery Lightbox图片查看触控插件
偶然间在网上看到的几个图片预览的插件,挺好用的,顺手整理下来. 1:Zoomify – jQuery缩放效果lightbox插件 地址:http://www.dowebok.com/214.html ...
- Java基础学习总结(6)——面向对象
一.JAVA类的定义 JAVA里面有class关键字定义一个类,后面加上自定义的类名即可.如这里定义的person类,使用class person定义了一个person类,然后在person这个类的类 ...
- A simpleHttp Proxy
http://www.java2s.com/Code/Java/Network-Protocol/Asimpleproxyserver.htm
- Qt之QCryptographicHash
简述 QCryptographicHash类提供了生成密码散列的方法.该类可以用于生成二进制或文本数据的加密散列值.目前支持MD4.MD5.SHA-1.SHA-224.SHA-256.SHA-384和 ...
- Objective-C的陷阱与缺陷
Objective-C是一个强大而且非常有用的语言,但是同样也是有一点危险的.这次主题是受到一篇有关C++陷阱的文章启发,来聊聊Objective-C和Cocoa中的陷阱. 简介 我将和Horstma ...
- poj 2337 Catenyms 【欧拉路径】
题目链接:http://poj.org/problem?id=2337 题意:给定一些单词,假设一个单词的尾字母与还有一个的首字母同样则能够连接.问能否够每一个单词用一次,将全部单词连接,能够则输出字 ...
- 又见关系并查集 以POJ 1182 食物链为例
简单的关系并查集一般非常easy依据给出的关系搞出一个有向的环,那么两者之间的关系就变成了两者之间的距离. 对于此题: 若u.v不在一个集合内,则显然此条语句会合法(暂且忽略后两条.下同). 那么将f ...
- HDU 4288-Coder(模拟)
Coder Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Su ...