我有一个表格视图,它从核心数据数组中获取数据。当我尝试将对象“Post”的值分配给某物或 NSLog 时,表格滚动滞后。
这是我的代码:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"CellCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
Post *post = [array objectAtIndex:indexPath.row];
// If I comment out the NSLog the scroll is smoothly
NSLog(@"%@", post.title);
// Same thing for the line below
cell.textLabel.text = post.title;
return cell;
}
编辑:
我正在使用 StackMob v1.2.0