Permalink
Browse files

Categories

  • Loading branch information...
1 parent 9a06527 commit 68504099f2b5e016f6b097b3691be7051489e7b0 @soffes soffes committed Jun 29, 2011
@@ -8,6 +8,6 @@
@interface UIColor (SSToolkitAdditions)
-- (CGFloat)alpha;
+@property (nonatomic, assign, readonly) CGFloat alpha;
@end
@@ -9,5 +9,6 @@
@interface UIDevice (SSToolkitAdditions)
- (BOOL)isSimulator;
+- (BOOL)isCrappy;
@end
@@ -11,10 +11,21 @@
@implementation UIDevice (SSToolkitAdditions)
- (BOOL)isSimulator {
-
static NSString *simulatorModel = @"iPhone Simulator";
+ return [[self model] isEqualToString:simulatorModel];
+}
+
+
+- (BOOL)isCrappy {
+ static NSString *iPodTouchModel = @"iPod touch";
+ static NSString *iPhoneModel = @"iPhone";
+ static NSString *iPhone3GModel = @"iPhone 3G";
+ static NSString *iPhone3GSModel = @"iPhone 3GS";
+
+ NSString *model = [self model];
- return [[self model] isEqual:simulatorModel];
+ return ([model isEqualToString:iPodTouchModel] || [model isEqualToString:iPhoneModel] ||
+ [model isEqualToString:iPhone3GModel] || [model isEqualToString:iPhone3GSModel]);
}
@end

0 comments on commit 6850409

Please sign in to comment.