2011-12-19 10 views

risposta

15

L'UITableView delegato deve solo implementare:

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

Implementare

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

e restituire il titolo personalizzato per eliminazione.

Da UITableViewDelegate docs

0

Codice:

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

In Swift:

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

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

Problemi correlati