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

Menu: Leverage using a UINavigationController

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 32b45d2d
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
[dismissButton setBackgroundImage:[UIImage imageNamed:@"doneButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [dismissButton setBackgroundImage:[UIImage imageNamed:@"doneButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[dismissButton setBackgroundImage:[UIImage imageNamed:@"doneButtonHighlight"] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault]; [dismissButton setBackgroundImage:[UIImage imageNamed:@"doneButtonHighlight"] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];
[dismissButton setTitleTextAttributes:@{UITextAttributeTextShadowColor : [UIColor whiteColor], UITextAttributeTextColor : [UIColor blackColor]} forState:UIControlStateNormal]; [dismissButton setTitleTextAttributes:@{UITextAttributeTextShadowColor : [UIColor whiteColor], UITextAttributeTextColor : [UIColor blackColor]} forState:UIControlStateNormal];
self.navigationItem.rightBarButtonItem = dismissButton; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
self.navigationItem.rightBarButtonItem = dismissButton;
} }
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
......
...@@ -117,13 +117,14 @@ ...@@ -117,13 +117,14 @@
{ {
UIViewController *aboutController = [[VLCAboutViewController alloc] initWithNibName:nil bundle:nil]; UIViewController *aboutController = [[VLCAboutViewController alloc] initWithNibName:nil bundle:nil];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:aboutController]; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
navController.navigationBar.barStyle = UIBarStyleBlack; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:aboutController];
[navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"] forBarMetrics:UIBarMetricsDefault]; navController.navigationBar.barStyle = UIBarStyleBlack;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) [navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"] forBarMetrics:UIBarMetricsDefault];
[navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackgroundPhoneLandscape"] forBarMetrics:UIBarMetricsLandscapePhone]; [self presentModalViewController:navController animated:YES];
} else {
[self presentModalViewController:navController animated:YES]; [self.navigationController pushViewController:aboutController animated:YES];
}
} }
- (IBAction)openNetworkStream:(id)sender - (IBAction)openNetworkStream:(id)sender
......
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