Objective-c中在ARC环境下使用PerformSelector方法回产生警告
来源:互联网 发布:消防车辆应知 编辑:程序博客网 时间:2024/05/16 09:39
Objective-c中在ARC环境下使用PerformSelector方法回产生警告:PerformSelector may cause a leak because its selector is unknown
解决办法是:添加这三行代码
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
#pragma clang diagnostic pop
举例子:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
if ([self.targetrespondsToSelector:self.action]) {
[self.targetperformSelector:self.actionwithObject:self];
}
#pragma clang diagnostic pop
0 0
- Objective-c中在ARC环境下使用PerformSelector方法回产生警告
- 忽略performSelector在ARC下的警告
- 在ARC项目中使用 performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector withObject
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:
- Objective-C中一种消息处理方法performSelector: withObject:(转)
- 当你心情不好时,
- MAC mysql安装及设置
- 通过 Terracotta实现基于Tomcat的Web应用集群
- UITableView:改变 TableHeaderView 的高度
- Android studio项目不能编译,提示设备版本过低
- Objective-c中在ARC环境下使用PerformSelector方法回产生警告
- 关于对FLASH开发,starling、starling feathers、starling MVC框架的理解
- SolrCore 'collection1' is not available due to init failure: Index locked for write for core collect
- IOS界面UI设计10之屏幕适配UITarbar、柱状图、相对位置
- 解析大写或不规范的JSON
- Java-位运算符详解实例——与(&)、非(~)、或(|)、异或(^)
- Android中ListView的条目中有button时,item和button抢焦点问题
- HTTP协议分析系列(二)------HTTP请求信息和相应信息的格式
- 深入hibernate的三种状态