- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CustomCell";
CustomCell *cell = (CustomCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
}
cell.cellDate.text=@"date";
cell.cellDescription.text =@"Description";
cell.cellImageview.image = [UIImage imageNamed:@"sample.png"];
cell.cellTitle.text = @"Title";
NSLog([cell Description]);
return cell;
}
NSLog([cell Description]);
返回空
以上是我的方法它给出以下错误:here
由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“UITableView 数据源必须从 tableView 返回一个单元格:cellForRowAtIndexPath:”