2011-12-19 12 views

Respuesta

15

El delegado UITableView sólo tiene que poner en práctica:

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath 
5

Implementar

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath 

y devolver su título personalizado para borrar.

Desde UITableViewDelegate docs

0

Código:

*- (NSString *)tableView:(UITableView *)tableView 
titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    return @"Rename"; // or put something else 
}* 
1

En Swift:

override func tableView(tableView: UITableView, titleForDeleteConfirmationButtonForRowAtIndexPath indexPath: NSIndexPath) -> String? { 
     return "Remove" 
    } 
+0

'tableView func (_ tableView: UITableView, titleForDeleteConfirmationButtonForRowAt indexPath: IndexPath) -> Alfa' en Swift? 3 – AppreciateIt

Cuestiones relacionadas