project_files/HedgewarsMobile/Classes/ExtraCategories.m
changeset 6615 65602f1ef0f8
parent 6300 db8fd3ff693c
child 6670 d57fa21781ea
--- a/project_files/HedgewarsMobile/Classes/ExtraCategories.m	Mon Jan 30 07:51:30 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/ExtraCategories.m	Mon Jan 30 23:20:28 2012 +0100
@@ -34,6 +34,16 @@
     return theScale;
 }
 
+-(CGRect) safeBounds {
+    CGRect original = [self bounds];
+    if (IS_IPAD() &&
+        ([[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortrait ||
+         [[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortraitUpsideDown) ) {
+        return original;
+    } else
+        return CGRectMake(original.origin.x, original.origin.y, original.size.height, original.size.width);
+}
+
 @end