ios编程错误:ARC禁止显式消息发送'gettain' [英] ios programming error: ARC forbids explicit message send of''retain'

查看:112
本文介绍了ios编程错误:ARC禁止显式消息发送'gettain'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我加了ARC,但是我得到了同样的错误,我正在使用xcode 4.6。

感谢您的帮助



@implementation any

- (void)viewDidLoad {

contentArray = [[NSArray arrayWithObjects:@a,@b,@c,Nill] retain]; / /错误ARC禁止显式消息发送'gettain'

[super viewDidLoad];

}

Hi I impored ARC but I got same error, I am using xcode 4.6 .
Thanks for your help

@implementation any
-(void)viewDidLoad{
contentArray=[[NSArray arrayWithObjects:@"a",@"b",@"c",Nill]retain];//error ARC forbids explicit message send of''retain'
[super viewDidLoad];
}

推荐答案

contentArray=[NSArray arrayWithObjects:@"a",@"b",@"c",Nill];//error ARC forbids explicit message 





即该消息告诉您ARV禁止保留,所以不指定保留?



i.e. the message tells you ARV forbids retain, so don't specify retain?


这篇关于ios编程错误:ARC禁止显式消息发送'gettain'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆