在tableviewcontroller的编辑模式下重命名“删除”按钮
答
的UITableView的委托仅仅需要实现:
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
答
实施
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
,并返回您的自定义标题为删除。
答
代码:
*- (NSString *)tableView:(UITableView *)tableView
titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
{
return @"Rename"; // or put something else
}*
答
在斯威夫特:
override func tableView(tableView: UITableView, titleForDeleteConfirmationButtonForRowAtIndexPath indexPath: NSIndexPath) -> String? {
return "Remove"
}
'FUNC的tableView(_的tableView:UITableView的,titleForDeleteConfirmationButtonForRowAt indexPath:IndexPath) - >字符串'斯威夫特? 3 – AppreciateIt 2017-08-26 02:44:55