equal
deleted
inserted
replaced
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 |