How to change uitableview delete button text

前端 未结 4 551
一向
一向 2020-12-13 03:13

Hi there I am trying to change the text that is showing in the delete button when a user swipes a uitableviewcell inside my tableview.

I have seen an example in anot

4条回答
  •  独厮守ぢ
    2020-12-13 03:53

    Just return the string that you want to display instead of delete. Say you wish to show "Erase" for all rows, the above function should contain:

    return @"Erase";
    

    Read THIS

    Also in your .h file, add the UITableViewDelegate in case your view controller is not a UITableViewController already. That is it can be either:

    @interface SomeView : UIViewController 
    

    OR

    @interface SomeView : UITableViewController
    

提交回复
热议问题