问题描述
我知道人们在这里讨厌模糊的问题,所以我只需要是或否的答案.我有一个tableView,希望人们能够编辑表的内容.
I know that people hate vague questions here so I just need a yes or no answer. I have a tableView and I want people to be able to edit the contents of the table.
我喜欢setEditing方法,但是我不希望按钮显示删除"-我更喜欢删除",并且有时我想显示多个按钮并隐藏删除"按钮.我只想知道这是否可能.
I like the setEditing method but I don't want the button to say Delete - I would prefer Remove and there are times where I want to display more than one button and hide the delete button. I just need to know if this is possible.
我准备放弃使用标准的编辑"和删除"按钮,而是自己制作,但在我想做之前,我想知道有什么可能.
I am ready to give up on using the standard edit and delete buttons and just make my own but before I did I wanted to know what was possible.
非常感谢谢丽尔
推荐答案
只需在您的UITableViewDelegate上实现此方法:
Just implement this method on your UITableViewDelegate:
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
然后,您可以设置该删除按钮的标题,并改为显示删除".
Then you can set the title for that delete button and make it say "Remove" instead.
这篇关于UITableView编辑模式显示自定义按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!