Explorar o código

menu: show about panel as modal view instead of pushing the view controller

Felix Paul Kühne %!s(int64=12) %!d(string=hai) anos
pai
achega
f5f849e808

+ 1 - 1
AspenProject/VLCAboutViewController.m

@@ -46,7 +46,7 @@
 
 - (IBAction)dismiss:(id)sender
 {
-    [self.navigationController popViewControllerAnimated:YES];
+    [self.navigationController dismissModalViewControllerAnimated:YES];
 }
 
 @end

+ 5 - 3
AspenProject/VLCMenuViewController.m

@@ -101,11 +101,13 @@
 
 - (IBAction)openAboutPanel:(id)sender
 {
-    VLCAppDelegate* appDelegate = [UIApplication sharedApplication].delegate;
     UIViewController *aboutController = [[VLCAboutViewController alloc] initWithNibName:@"VLCAboutViewController" bundle:nil];
-    [appDelegate.playlistViewController.navigationController pushViewController:aboutController animated:YES];
 
-    [self _hideAnimated:NO];
+    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:aboutController];
+    navController.navigationBarHidden = NO;
+    navController.navigationBar.barStyle = UIBarStyleBlack;
+
+    [self presentModalViewController:navController animated:YES];
 }
 
 - (IBAction)openNetworkStream:(id)sender