Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 32 lines (23 sloc) 0.809 kb
f3d43b6 @soffes The Great Rename
soffes authored
1 //
2 // UIDevice+SSToolkitAdditions.m
3 // SSToolkit
4 //
5 // Created by Sam Soffes on 7/13/09.
e8c3ce3 @soffes Updated comments and renamed SSDrawingMacros to SSDrawingUtilities
soffes authored
6 // Copyright 2009-2011 Sam Soffes. All rights reserved.
f3d43b6 @soffes The Great Rename
soffes authored
7 //
8
9 #import "UIDevice+SSToolkitAdditions.h"
10
11 @implementation UIDevice (SSToolkitAdditions)
12
13 - (BOOL)isSimulator {
14 static NSString *simulatorModel = @"iPhone Simulator";
6850409 @soffes Categories
soffes authored
15 return [[self model] isEqualToString:simulatorModel];
16 }
17
18
19 - (BOOL)isCrappy {
20 static NSString *iPodTouchModel = @"iPod touch";
21 static NSString *iPhoneModel = @"iPhone";
22 static NSString *iPhone3GModel = @"iPhone 3G";
23 static NSString *iPhone3GSModel = @"iPhone 3GS";
24
25 NSString *model = [self model];
f3d43b6 @soffes The Great Rename
soffes authored
26
6850409 @soffes Categories
soffes authored
27 return ([model isEqualToString:iPodTouchModel] || [model isEqualToString:iPhoneModel] ||
28 [model isEqualToString:iPhone3GModel] || [model isEqualToString:iPhone3GSModel]);
f3d43b6 @soffes The Great Rename
soffes authored
29 }
30
31 @end
Something went wrong with that request. Please try again.