I have a UINavigationController in which I have UITableView and I’m using editButtonItem for editing the UITableView.
Here’s the code:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
self.editButtonItem.title = @"تحرير";
self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
On first launch the the title for edit button is shown as desired. But when I tap on it, the Table view enters editing mode and Done is shown. When I tap on Done, the title resets to default Edit.
Do I have to set the title on every toggle in:
- (void)setEditing:(BOOL)editing animated:(BOOL)animated;
Or is there any better way to do it? I also want to change the “Done” text while in editing mode.
yes ,
If you want custom titles you have to do it in