-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