Cocoa touch 如何在序列图像板中定义表视图单元以用于代码?
我的故事板上有一个TableViewController,其中有一些单元格(静态),我想在点击单元格时添加一个复选标记,我如何能够从故事板调用各个单元格而不必在代码中构建它们?在表视图的委托中:Cocoa touch 如何在序列图像板中定义表视图单元以用于代码?,cocoa-touch,uitableview,storyboard,uistoryboard,Cocoa Touch,Uitableview,Storyboard,Uistoryboard,我的故事板上有一个TableViewController,其中有一些单元格(静态),我想在点击单元格时添加一个复选标记,我如何能够从故事板调用各个单元格而不必在代码中构建它们?在表视图的委托中: - (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)ip { MyCustomCell *cell = [tv cellForRowAtIndexPath:ip]; // add the
- (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)ip
{
MyCustomCell *cell = [tv cellForRowAtIndexPath:ip];
// add the checkmark to the cell
[cell.contentView addSubview:checkmarkIcon];
}