project_files/HedgewarsMobile/Classes/SplitViewRootController.m
changeset 3535 9e78c1f3d8d8
parent 3514 59dbd31e9953
child 3546 ccf4854df294
--- a/project_files/HedgewarsMobile/Classes/SplitViewRootController.m	Tue Jun 22 18:06:55 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SplitViewRootController.m	Wed Jun 23 01:00:52 2010 +0200
@@ -38,9 +38,7 @@
     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
         self.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
         
-    Class splitViewControllerClass = NSClassFromString(@"UISplitViewController");
-    if (splitViewControllerClass) {
-#if __IPHONE_3_2
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
         UISplitViewController *splitViewRootController = [[UISplitViewController alloc] init];
         //splitViewRootController.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;        
         splitViewRootController.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
@@ -57,7 +55,6 @@
         
         // add view to main controller
         [self.view addSubview:splitViewRootController.view];
-#endif
     } else {
         [self.view addSubview:detailedNavController.view];
     }