project_files/HedgewarsMobile/Classes/ExtraCategories.m
changeset 6615 65602f1ef0f8
parent 6300 db8fd3ff693c
child 6670 d57fa21781ea
equal deleted inserted replaced
6614:f88f67a17a9d 6615:65602f1ef0f8
    30 -(CGFloat) safeScale {
    30 -(CGFloat) safeScale {
    31     CGFloat theScale = 1.0f;
    31     CGFloat theScale = 1.0f;
    32     if ([self respondsToSelector:@selector(scale)])
    32     if ([self respondsToSelector:@selector(scale)])
    33          theScale = [self scale];
    33          theScale = [self scale];
    34     return theScale;
    34     return theScale;
       
    35 }
       
    36 
       
    37 -(CGRect) safeBounds {
       
    38     CGRect original = [self bounds];
       
    39     if (IS_IPAD() &&
       
    40         ([[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortrait ||
       
    41          [[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortraitUpsideDown) ) {
       
    42         return original;
       
    43     } else
       
    44         return CGRectMake(original.origin.x, original.origin.y, original.size.height, original.size.width);
    35 }
    45 }
    36 
    46 
    37 @end
    47 @end
    38 
    48 
    39 
    49