在 UITableView
中启用编辑模式时,有没有办法拥有自定义编辑样式图标(除了绿色加号和红色减号图标之外)?
我知道我可以模拟编辑模式动画,只需将单元格内容移动到右侧并添加 UIImageView,但我试图避免这种情况。
最佳答案
自定义单元格编辑样式的唯一方法是使用 tableView:editingStyleForRowAtIndexPath:它必须返回 UITableViewCellEditingStyle。
无、删除(红色减号)和插入(绿色加号)是唯一的选项。来自 documentation :
Cell Editing Style
The editing control used by a cell.
typedef enum { UITableViewCellEditingStyleNone, UITableViewCellEditingStyleDelete, UITableViewCellEditingStyleInsert } UITableViewCellEditingStyle;
关于iphone - 如何在编辑模式下在 UITableViewCell 中设置自定义编辑样式图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2062256/