【发布时间】:2011-11-10 09:00:09
【问题描述】:
我在 Xcode 4.2 中遇到 [alertsuccess release] 错误。它表示该版本不可用且在自动引用计数模式下不可用,并且 ARC 禁止显式发送发布消息。
我的应用程序和代码在 Xcode 4.1 中运行。怎么了?
if([serverOutput isEqualToString:@"Yes"]){
UIAlertView *alertsuccess = [[UIAlertView alloc] initWithTitle:@"Congrats" message:@"You are authorized "
delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alertsuccess show];
[alertsuccess release];
} else {
UIAlertView *alertsuccess = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Username or Password Incorrect"
delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alertsuccess show];
[alertsuccess release];
}
【问题讨论】:
-
ARC error when compiling 的可能重复项
标签: xcode4.2