more backward compatibility
authorkoda
Sat, 27 Nov 2010 23:29:07 +0100
changeset 4358 0445d807193e
parent 4356 d1d26f8963a3
child 4360 6cdb427ef82c
more backward compatibility
project_files/HedgewarsMobile/Classes/InGameMenuViewController.m
project_files/HedgewarsMobile/Classes/MainMenuViewController.m
project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj
--- a/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m	Thu Nov 25 02:45:52 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m	Sat Nov 27 23:29:07 2010 +0100
@@ -185,7 +185,7 @@
 #pragma mark -
 #pragma mark actionSheet methods
 -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
-    if (IS_IPAD()){
+    if (IS_IPAD() == NO){
         CGRect screen = [[UIScreen mainScreen] bounds];
         [UIView beginAnimations:@"table width less" context:NULL];
         [UIView setAnimationDuration:0.2];
--- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m	Thu Nov 25 02:45:52 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m	Sat Nov 27 23:29:07 2010 +0100
@@ -190,11 +190,11 @@
             if (nil == self.aboutViewController) {
                 AboutViewController *about = [[AboutViewController alloc] initWithNibName:@"AboutViewController" bundle:nil];
                 about.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
-                about.modalPresentationStyle = UIModalPresentationFormSheet;
+                if ([about respondsToSelector:@selector(setModalPresentationStyle:)])
+                     about.modalPresentationStyle = UIModalPresentationFormSheet;
                 self.aboutViewController = about;
                 [about release];
             }
-            
             [self presentModalViewController:self.aboutViewController animated:YES];
 #endif
             break;
@@ -202,7 +202,8 @@
             if (nil == self.savedGamesViewController) {
                 SavedGamesViewController *savedgames = [[SavedGamesViewController alloc] initWithNibName:@"SavedGamesViewController" bundle:nil];
                 savedgames.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
-                savedgames.modalPresentationStyle = UIModalPresentationPageSheet;
+                if ([savedgames respondsToSelector:@selector(setModalPresentationStyle:)])
+                    savedgames.modalPresentationStyle = UIModalPresentationPageSheet;
                 self.savedGamesViewController = savedgames;
                 [savedgames release];
             }
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Thu Nov 25 02:45:52 2010 +0100
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Sat Nov 27 23:29:07 2010 +0100
@@ -1024,21 +1024,21 @@
 		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
 			isa = PBXGroup;
 			children = (
+				6165929C11CA9E2F00D6E256 /* SDL_uikitappdelegate.h */,
+				6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */,
 				61DE91561258B76800B80214 /* Custom Buttons */,
 				32CA4F630368D1EE00C91783 /* Hedgewars_Prefix.pch */,
 				6165922911CA9BD500D6E256 /* PascalImports.h */,
-				6165922411CA9BD500D6E256 /* CGPointUtils.h */,
-				6165922311CA9BD500D6E256 /* CGPointUtils.c */,
-				6165929C11CA9E2F00D6E256 /* SDL_uikitappdelegate.h */,
-				6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */,
+				61D2059F127CDD1100ABD83E /* ObjcExports.h */,
+				61D205A0127CDD1100ABD83E /* ObjcExports.m */,
 				6165922511CA9BD500D6E256 /* CommodityFunctions.h */,
 				6165922611CA9BD500D6E256 /* CommodityFunctions.m */,
+				61006F93128DE31F00EBA7F7 /* CreationChamber.h */,
+				61006F94128DE31F00EBA7F7 /* CreationChamber.m */,
+				6165922411CA9BD500D6E256 /* CGPointUtils.h */,
+				6165922311CA9BD500D6E256 /* CGPointUtils.c */,
 				6165922C11CA9BD500D6E256 /* UIImageExtra.h */,
 				6165922D11CA9BD500D6E256 /* UIImageExtra.m */,
-				61D2059F127CDD1100ABD83E /* ObjcExports.h */,
-				61D205A0127CDD1100ABD83E /* ObjcExports.m */,
-				61006F93128DE31F00EBA7F7 /* CreationChamber.h */,
-				61006F94128DE31F00EBA7F7 /* CreationChamber.m */,
 			);
 			name = "Other Sources";
 			sourceTree = "<group>";