我使用另一个视图控制器为我的表视图创建了一个自定义单元格,以便向其中添加内容。但奇怪的是,内容显示得很慢。我的意思是大多数时候只有中心线出现(有时什么也没有出现),然后玩单元格,一段时间后,其余的内容(总共3行)最终出现。

一段时间后,

一切都在这里。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
eatEventTableViewCell *cell = (eatEventTableViewCell*)[tableView dequeueReusableCellWithIdentifier:@"expenseCell"];
if (cell == nil) {
cell = [[eatEventTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"expenseCell"];
}
[self configureCell:cell atIndexPath:indexPath];
return cell;
}
- (void)configureCell:(eatEventTableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath
{
NSManagedObject *object = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell.nameField.text = [[object valueForKey:@"descText"] description];
cell.tagsField.text = [[object valueForKey:@"type"] description];
cell.creationDateLabel.text = [eatAddViewController dateFormat:[[object valueForKey:@"timeStamp"] description] :TRUE];
if([eatExpenseType getSelectionValue :cell.tagsField.text :m_setting])
{
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
else
{
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
}
}发布于 2013-01-24 09:13:57
https://stackoverflow.com/questions/14492252
复制相似问题