EXC_BAD_ACCESS(代码=1,地址=0x71474b80)
当用户从嵌套的 UITableView 中一直向下滚动返回时,会出现此错误。如果我不滚动到底部,则不会发生错误。
可能存在建议的重新分配问题
UIViewTableController: "EXC_BAD_ACCESS" When Scrolling Up/Down Past the Max Position of the Table
我的代码是:
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"TroncalesInfo";
TroncalesViewCell *cell = [[TroncalesViewCell alloc]init];
cell = [tabla dequeueReusableCellWithIdentifier:CellIdentifier];
cell.IDTroncal = [nombresTroncales objectAtIndex:indexPath.row];
[cell setCellAtributes:indexPath db:dataBase];
return cell;
}
最佳答案
这是我经常使用的小技巧。我不知道它为什么有效,但请尝试一下 ;)。
将此插入到您的 viewController 的 viewWillDisappear 中:
tabla.delegate = nil;
关于ios - EXC_BAD_ACCESS 仅当从 UITableView 中一直向下滚动返回时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20589028/