刚刚创建了一个 UITableView,
试图从数组中显示一些自定义数据,但无论我做什么,我都没有显示任何文本。
NSLog 告诉我正确的文本和正确的数量,但表格单元格中没有文本。
这是代码:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
}
cell.textLabel.text = @"test";
[self configureCell:cell atIndexPath:indexPath];
return cell;
}