Created
September 24, 2011 13:44
-
-
Save steipete/1239338 to your computer and use it in GitHub Desktop.
PSIsCrappyDevice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOL PSIsCrappyDevice(void) { | |
static BOOL isCrappyDevice = YES; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
BOOL isSimulator = NO; | |
BOOL isIPad2 = (PSIsIpad() && [UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]); | |
BOOL hasRetina = [[UIScreen mainScreen] scale] > 1.f; | |
// enable animations on simulator | |
#if TARGET_IPHONE_SIMULATOR | |
isSimulator = YES; | |
#endif | |
if (isIPad2 || hasRetina || isSimulator) { | |
isCrappyDevice = NO; | |
} | |
}); | |
return isCrappyDevice; | |
} |
The latest iPod touch now has an A4 and retina, so it returns YES there.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
True that. Took a look at my version of it. Anyway, why does it return NO for an iPod touch 4? They iPod touch isn't that good.