project_files/HedgewarsMobile/Classes/UIImageExtra.m
changeset 4461 2f4f5d649bcd
parent 4446 3093791dc620
child 4476 4bf74e158f44
--- a/project_files/HedgewarsMobile/Classes/UIImageExtra.m	Sun Dec 05 00:05:21 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.m	Sun Dec 05 02:44:20 2010 +0100
@@ -219,7 +219,12 @@
     CGContextRelease(context);
     CGColorSpaceRelease(colorSpace);
 
-    UIImage *newImage = [UIImage imageWithCGImage:imageMasked scale:theScale orientation:UIImageOrientationUp];
+    UIImage *newImage;
+    if ([self respondsToSelector:@selector(imageWithCGImage:scale:orientation:)])
+        newImage = [UIImage imageWithCGImage:imageMasked scale:theScale orientation:UIImageOrientationUp];
+    else
+        newImage = [UIImage imageWithCGImage:imageMasked];
+
     CGImageRelease(imageMasked);
 
     return newImage;