project_files/HedgewarsMobile/Classes/SplitViewRootController.m
changeset 5219 9e2a17ab178b
parent 5208 878e551f0b4a
child 6000 dbcebcd3d79f
--- a/project_files/HedgewarsMobile/Classes/SplitViewRootController.m	Sat May 28 16:59:09 2011 -0400
+++ b/project_files/HedgewarsMobile/Classes/SplitViewRootController.m	Sat May 28 16:40:23 2011 +0200
@@ -45,6 +45,7 @@
 
     if (self.activeController == nil) {
         MasterViewController *rightController = [[MasterViewController alloc] initWithStyle:UITableViewStyleGrouped];
+        rightController.rootController = self;
         rightController.targetController = nil;
         self.activeController = rightController;
         [rightController release];
@@ -53,6 +54,7 @@
 
     if (IS_IPAD()) {
         MasterViewController *leftController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
+        leftController.rootController = self;
         leftController.targetController = self.activeController;
         UINavigationController *leftNavController = [[UINavigationController alloc] initWithRootViewController:leftController];
         [leftController release];
@@ -74,6 +76,11 @@
     [super viewDidLoad];
 }
 
+-(void) dismissModalViewControllerAnimated:(BOOL)animated {
+    playSound(@"backSound");
+    [self.parentViewController dismissModalViewControllerAnimated:YES];
+}
+
 -(void) viewDidUnload {
     self.activeController = nil;
     self.rightNavController = nil;