Commit 2225db4f authored by Romain Goyet's avatar Romain Goyet Committed by Felix Paul Kühne

Reduce code duplication

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 6aea606c
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#import "VLCPlaylistTableViewCell.h" #import "VLCPlaylistTableViewCell.h"
#import "VLCPlaylistGridView.h" #import "VLCPlaylistGridView.h"
#import "VLCMenuViewController.h" #import "VLCMenuViewController.h"
#import "UINavigationController+Theme.h"
#import "NSString+SupportedMedia.h" #import "NSString+SupportedMedia.h"
@implementation EmptyLibraryView @implementation EmptyLibraryView
...@@ -297,10 +298,7 @@ ...@@ -297,10 +298,7 @@
if (self.menuViewController == nil) { if (self.menuViewController == nil) {
VLCMenuViewController *menuViewController = [[VLCMenuViewController alloc] initWithNibName:nil bundle:nil]; VLCMenuViewController *menuViewController = [[VLCMenuViewController alloc] initWithNibName:nil bundle:nil];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:menuViewController]; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:menuViewController];
[navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"] [navigationController loadTheme],
forBarMetrics:UIBarMetricsDefault];
[navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackgroundPhoneLandscape"]
forBarMetrics:UIBarMetricsLandscapePhone];
self.menuViewController = navigationController; self.menuViewController = navigationController;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
navigationController.navigationBarHidden = YES; navigationController.navigationBarHidden = YES;
......
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