【发布时间】:2009-12-27 18:07:08
【问题描述】:
当我在我的表格视图中选择一个单元格时,该单元格被附件类型检查标记推到了左侧。
我的自定义单元格以编程方式插入到 tableview 中
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *selectedCell = [tableView cellForRowAtIndexPath:
indexPath];
if (selectedCell.accessoryType == UITableViewCellAccessoryNone) {
selectedCell.accessoryType = UITableViewCellAccessoryCheckmark;
}
else {
selectedCell.accessoryType = UITableViewCellAccessoryNone;
}
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
【问题讨论】:
-
我认为他不希望单元格的内容在复选标记可见时缩进......
-
嗨,jasarien,没错!谢谢
标签: iphone cocoa-touch uitableview uikit