Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It is possible to edit swipe to delete's (in UITableView) default text or translate it?

Tags:

ios

swift

iphone

Is possible to translate the swipe to delete message in a UITableView in iOS7?

I'm using two delegate methods to show de system swipe to delete button in specific rows of a UITableView

like image 940
Gabriel Goncalves Avatar asked Apr 10 '15 21:04

Gabriel Goncalves


1 Answers

Yes, implement the function of UITableViewDelegate:

func tableView(tableView: UITableView, titleForDeleteConfirmationButtonForRowAtIndexPath indexPath: NSIndexPath) -> String! {
        return "your string" //or customize for each indexPath
}
like image 144
Duyen-Hoa Avatar answered Nov 09 '22 11:11

Duyen-Hoa