Browse Source

Reduce code duplication

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Romain Goyet 12 years ago
parent
commit
2225db4f49
1 changed files with 2 additions and 4 deletions
  1. 2 4
      AspenProject/VLCPlaylistViewController.m

+ 2 - 4
AspenProject/VLCPlaylistViewController.m

@@ -13,6 +13,7 @@
 #import "VLCPlaylistTableViewCell.h"
 #import "VLCPlaylistGridView.h"
 #import "VLCMenuViewController.h"
+#import "UINavigationController+Theme.h"
 #import "NSString+SupportedMedia.h"
 
 @implementation EmptyLibraryView
@@ -297,10 +298,7 @@
     if (self.menuViewController == nil) {
         VLCMenuViewController *menuViewController = [[VLCMenuViewController alloc] initWithNibName:nil bundle:nil];
         UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:menuViewController];
-        [navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"]
-                                                 forBarMetrics:UIBarMetricsDefault];
-        [navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackgroundPhoneLandscape"]
-                                                 forBarMetrics:UIBarMetricsLandscapePhone];
+        [navigationController loadTheme],
         self.menuViewController = navigationController;
         if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
             navigationController.navigationBarHidden = YES;