-4
文本的单元之后将看到能够点击在单元格中的文本可以点击
代码的cellForRowAtIndexPath
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"DrawConfirmCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
if (cell ==nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
cell.textLabel.textColor = [UIColor darkTextColor];
cell.detailTextLabel.textColor = [UIColor grayColor];
}
Model *model = [_itemArray objectAtIndex:indexPath.row];
cell.textLabel.text = model.sign;
cell.detailTextLabel.text = model.message;
[cell.detailTextLabel setFont:[UIFont systemFontOfSize:model.fontSize.intValue]];
return cell;
}
更好地解释你的问题。你想做什么? – Dharmik
你的问题是什么?你刚刚发布了代码。 –
@ zz2370092729,我想你在点击单元格后看不到标签。你可能不是因为你选择了细胞。把下面的代码放到你的表didSelectRowAtIndex方法中并检查。 [tableView deselectRowAtIndexPath:indexPath animated:YES]; – Dharmik