如何为 uitableview 自定义多选编辑模式 [英] How to customize multiselect edit mode for uitableview

查看:32
本文介绍了如何为 uitableview 自定义多选编辑模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以自定义多选编辑模式?因此,我需要显示一个自定义的选择图标,而不是默认的选择图标(带复选标记的圆圈),具有选中和未选中状态.

Is it possible to customize the multiselect edit mode? So instead of the default selection icon (the circle with the checkmark), I need to show a custom one, with selected and unselected states.

我还需要将单元格更向右缩进.

I also need to indent the cell more to the right.

显然我想尽可能多地使用系统提供的动画.

Obviously I would like to use as much as possible of the system provided animations.

这是 uitableview 的示例编辑模式的屏幕截图.(我的单元格要复杂得多:)

HEre's a screenshot of the sample editing mode of uitableview. (My cell is much more complicated :)

谢谢,Jason

推荐答案

您可以自定义单元格.. 使用 UIButton 创建一个 UITableViewCell 并为选定和默认状态设置您想要的自定义图像并在 cellForRowAtIndexPath:

You can customise the cell.. create a UITableViewCell with a UIButton and set the custom images you want for the selected and default states and load this custom cell in cellForRowAtIndexPath:

这篇关于如何为 uitableview 自定义多选编辑模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆