UITableView滑动删除:如何自定义按钮和动作? [英] UITableView Swipe to delete: how to customize button and action?

查看:76
本文介绍了UITableView滑动删除:如何自定义按钮和动作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想执行其他操作,而不是删除对象,而是将其存档. 当用户在tableViewCell上滑动时,我需要显示存档"而不是删除.将删除"按钮的文本和颜色更改为其他内容.

I want to perform different action, not delete objects but archive them. When user swiped on tableViewCell I need to show "Archive" instead of delete. change "Delete" button text and color to something else.

如何自定义删除模式"外观?

How do I customize "Delete mode" appearance?

推荐答案

显然,在3.0及更高版本中,存在这样的方法:

Apparently in 3.0 and later there is such method:

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);

这篇关于UITableView滑动删除:如何自定义按钮和动作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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