Commit 62f1438c authored by Soomin Lee's avatar Soomin Lee Committed by Jean-Baptiste Kempf

iOS: Fix edit button title flickering

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 80024830
......@@ -1305,7 +1305,6 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
[self setSearchBar:!editing resetContent:!editing];
self.tableView.allowsMultipleSelectionDuringEditing = editing;
[self.tableView setEditing:editing animated:YES];
[self.editButtonItem setTitle:editing ? NSLocalizedString(@"BUTTON_CANCEL", nil) : NSLocalizedString(@"BUTTON_EDIT", nil)];
} else {
NSArray *visibleCells = self.collectionView.visibleCells;
......@@ -1336,9 +1335,12 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
_indexPaths = nil;
[self updateViewContents];
}
self.navigationController.toolbarHidden = !editing;
[UIView performWithoutAnimation:^{
[editButton setTitle:editing ? NSLocalizedString(@"BUTTON_CANCEL", nil) : NSLocalizedString(@"BUTTON_EDIT", nil)];
}];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
NSMutableArray *rightBarButtonItems = [self.navigationItem.rightBarButtonItems mutableCopy];
UIBarButtonItem *toggleDisplayedView = rightBarButtonItems[0];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment