我有这样的代码:向下滚动崩溃应用
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"BSTGListCell";
BSTGListCell *cell = (BSTGListCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil)
{
cell = [[[NSBundle mainBundle] loadNibNamed:@"BSTGListCell" owner:self options:nil] objectAtIndex:0];
}
PFObject* currentEl = [self.tableData objectAtIndex:indexPath.row];
cell.title.text = [currentEl objectForKey:@"Name"];
cell.description.text = [currentEl objectForKey:@"Address"];
return cell;
}
我收到“消息发送到释放实例”向下滚动其添加为表视图时一个子视图。 僵尸检查员说,访问对象在这里保留:
cell = [[[NSBundle mainBundle] loadNibNamed:@"BSTGListCell" owner:self options:nil] objectAtIndex:0];
,并可能是由ARC释放。 为什么会发生这种情况,我如何防止它?
这不完全是我用了修复,但非常接近的。 – Octavian
@Octavian,你使用了什么修补程序? – rdelmar
请为面临同样问题的其他人添加您的解决方案! – cph2117