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 @@
[dismissButton setBackgroundImage:[UIImage imageNamed:@"doneButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[dismissButton setBackgroundImage:[UIImage imageNamed:@"doneButtonHighlight"] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];
[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
......
......@@ -117,13 +117,14 @@
{
UIViewController *aboutController = [[VLCAboutViewController alloc] initWithNibName:nil bundle:nil];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:aboutController];
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];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:aboutController];
navController.navigationBar.barStyle = UIBarStyleBlack;
[navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"] forBarMetrics:UIBarMetricsDefault];
[self presentModalViewController:navController animated:YES];
} else {
[self.navigationController pushViewController:aboutController animated:YES];
}
}
- (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