Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 应用程序在IOS 5上崩溃,使用以前的版本_Iphone_Xcode4_Ios5 - Fatal编程技术网

Iphone 应用程序在IOS 5上崩溃,使用以前的版本

Iphone 应用程序在IOS 5上崩溃,使用以前的版本,iphone,xcode4,ios5,Iphone,Xcode4,Ios5,我的应用程序于10月5日在App Store上发布。它在除iOS5之外的所有iOS版本上都运行良好。在一个特定的类上,它与以下语句冲突: [[self.tableView cellForRowAtIndexPath:lastIndex] setAccessoryType:UITableViewCellAccessoryNone]; 我收到错误“执行错误访问” 这可能是因为苹果在iOS 5中引入了ARC吗?应该保留indexPath 添加[lastIndex retain]在您的声明之

我的应用程序于10月5日在App Store上发布。它在除iOS5之外的所有iOS版本上都运行良好。在一个特定的类上,它与以下语句冲突:

[[self.tableView cellForRowAtIndexPath:lastIndex] 
  setAccessoryType:UITableViewCellAccessoryNone];  
我收到错误“执行错误访问”


这可能是因为苹果在iOS 5中引入了ARC吗?

应该保留indexPath


添加<代码>[lastIndex retain]在您的声明之前。

谢谢,伙计,它很有效,非常感谢,但现在它在'MyViewController*m=[[MyViewController alloc]initWithNibName:@“MyViewController”bundle:Nil]autorelease]上崩溃了;[self.navigationController pushViewController:m动画:是];'它给出了SIGBRT,但在以前的所有版本上都运行良好。你能给我们读出来的xcode在崩溃时给你的吗?请在错误行上方和下方给我们几行。不,这与ARC无关,因为您的应用程序版本从未使用ARC编译。