Explorar el Código

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

Felix Paul Kühne hace 12 años
padre
commit
f5f849e808
Se han modificado 2 ficheros con 6 adiciones y 4 borrados
  1. 1 1
      AspenProject/VLCAboutViewController.m
  2. 5 3
      AspenProject/VLCMenuViewController.m

+ 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