Можем ли мы переименовать кнопку «Удалить», когда перевод таблицы в режиме редактирования на что-то еще?
Делегат UITableView просто должен реализовать:
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
Реализовать
И верните свой пользовательский заголовок для удаления.
С UITableViewDelegate документы
В Свифт:
override func tableView(tableView: UITableView, titleForDeleteConfirmationButtonForRowAtIndexPath indexPath: NSIndexPath) -> String? { return "Remove" }
Код:
*- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath { return @"Rename"; // or put something else }*