我试图在我的表格视图单元格上添加副标题,但是它们没有显示出来。
问题出在哪里?
这一行代码[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle]
是否与iOS 7保持最新?
祝好
Frank
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
if (!cell)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
cell.textLabel.text = @"TestA";
cell.detailTextLabel.text = @"TestB";
return cell;
}