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

Use a UINavigationController

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent a5b8236c
......@@ -60,11 +60,7 @@
[dismissButton setTitleTextAttributes:@{UITextAttributeTextShadowColor : [UIColor whiteColor], UITextAttributeTextColor : [UIColor blackColor]} forState:UIControlStateNormal];
dismissButton.width = 80.;
self.dismissToolBar.items = @[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil], dismissButton];
[self.dismissToolBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"] forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
[self.dismissToolBar setBackgroundImage:[UIImage imageNamed:@"navBarBackgroundPhoneLandscape"] forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsLandscapePhone];
self.navigationItem.rightBarButtonItem = dismissButton;
self.scrollView.contentSize = self.view.frame.size;
}
......
......@@ -276,8 +276,15 @@
- (IBAction)leftButtonAction:(id)sender
{
if (self.menuViewController == nil)
self.menuViewController = [[VLCMenuViewController alloc] initWithNibName:nil bundle:nil];
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];
self.menuViewController = navigationController;
}
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
self.menuViewController.contentSizeForViewInPopover = self.menuViewController.view.frame.size;
......
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