我有一个uitableview,当我按下与之关联的编辑按钮时,我不想让单元格缩进,但我仍然希望插入添加/删除按钮。当我有 tableView:shouldIndentWhileEditingRowAtIndexPath 返回NO时,单元格仍会缩进,除非我有 editingStyleForRowAtIndexPath 返回 UITableViewCellEditingStyleNone 。最简单的方法是什么?感谢
答案 0 :(得分:3)
我正在观看Apple开发者 - iPhone开发基金会视频会议的“会议432 - 掌握iPhone表格视图”,并在大约5:15进入,他们谈论
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath;
他们甚至在左侧有红色可删除图标的图像(它们出现在单元格内)。
除非他们在最近的iOS版本中对此进行了更改,否则这应该可行。
我想感谢你提到tableView:shouldIndentWhileEditingRowAtIndexPath,因为它解决了我遇到的问题! :)
jorj
答案 1 :(得分:0)
我还没有找到解决方案,但我可以解释为什么tableView:shouldIndentWhileEditingRowAtIndexPath:
无效。根据它的评论:
// This method only applies to grouped style table views.