Просмотр исходного кода

iOS: Replace secondFixedSpace by a single fixedSpace

The secondFixedSpace was not initialized properly and since we need to have
the same space between each item, it could be replaced by a single fixed space.

Close #19

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Soomin Lee 8 лет назад
Родитель
Сommit
c27b3b5eb5
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      Sources/VLCLibraryViewController.m

+ 1 - 3
Sources/VLCLibraryViewController.m

@@ -209,8 +209,6 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
 
     UIBarButtonItem *fixedSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
     fixedSpace.width = 20;
-    UIBarButtonItem *secondFixedSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
-    fixedSpace.width = 20;
 
     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
         fixedSpace.width *= 2;
@@ -223,7 +221,7 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
                             [UIBarButtonItem themedDarkToolbarButtonWithTitle:NSLocalizedString(@"BUTTON_RENAME", nil) target:self andSelector:@selector(renameSelection)],
                             [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil],
                             _removeFromFolderBarButtonItem,
-                            secondFixedSpace,
+                            fixedSpace,
                             _deleteSelectedBarButtonItem]];
     self.navigationController.toolbar.barStyle = UIBarStyleBlack;
     self.navigationController.toolbar.tintColor = [UIColor whiteColor];