Commit 6aea606c authored by Romain Goyet's avatar Romain Goyet Committed by Felix Paul Kühne

Remove duplicated code

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent d8330733
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#import "Reachability.h" #import "Reachability.h"
#import "VLCHTTPFileDownloader.h" #import "VLCHTTPFileDownloader.h"
#import "IASKAppSettingsViewController.h" #import "IASKAppSettingsViewController.h"
#import "UINavigationController+Theme.h"
#import "VLCOpenNetworkStreamViewController.h" #import "VLCOpenNetworkStreamViewController.h"
#import "VLCHTTPDownloadViewController.h" #import "VLCHTTPDownloadViewController.h"
...@@ -125,8 +126,7 @@ ...@@ -125,8 +126,7 @@
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:aboutController]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:aboutController];
navController.navigationBar.barStyle = UIBarStyleBlack; [navController loadTheme];
[navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"] forBarMetrics:UIBarMetricsDefault];
[self presentModalViewController:navController animated:YES]; [self presentModalViewController:navController animated:YES];
} else { } else {
[self.navigationController pushViewController:aboutController animated:YES]; [self.navigationController pushViewController:aboutController animated:YES];
...@@ -164,11 +164,7 @@ ...@@ -164,11 +164,7 @@
self.settingsController.viewController = self.settingsViewController; self.settingsController.viewController = self.settingsViewController;
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self.settingsViewController]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self.settingsViewController];
navController.navigationBarHidden = NO; [navController loadTheme];
navController.navigationBar.barStyle = UIBarStyleBlack;
[navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"] forBarMetrics:UIBarMetricsDefault];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
[navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackgroundPhoneLandscape"] forBarMetrics:UIBarMetricsLandscapePhone];
[self presentModalViewController:navController animated:YES]; [self presentModalViewController:navController animated:YES];
UIBarButtonItem *doneButton = self.settingsViewController.navigationItem.rightBarButtonItem; UIBarButtonItem *doneButton = self.settingsViewController.navigationItem.rightBarButtonItem;
...@@ -218,11 +214,7 @@ ...@@ -218,11 +214,7 @@
appDelegate.dropboxTableViewController.modalPresentationStyle = UIModalPresentationFormSheet; appDelegate.dropboxTableViewController.modalPresentationStyle = UIModalPresentationFormSheet;
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:appDelegate.dropboxTableViewController]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:appDelegate.dropboxTableViewController];
navController.navigationBarHidden = NO; [navController loadTheme];
navController.navigationBar.barStyle = UIBarStyleBlack;
[navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"] forBarMetrics:UIBarMetricsDefault];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
[navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackgroundPhoneLandscape"] forBarMetrics:UIBarMetricsLandscapePhone];
[self presentModalViewController:navController animated:YES]; [self presentModalViewController:navController animated: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