Created
July 14, 2011 19:48
-
-
Save pjaspers/1083277 to your computer and use it in GitHub Desktop.
iPad check
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
// A check to see if we're running on an iPad. | |
// Blatantly picked up from: http://cocoawithlove.com/2010/07/tips-tricks-for-conditional-ios3-ios32.html | |
static inline BOOL IsIPad() { | |
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 | |
if ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && | |
[[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) | |
{ | |
return YES; | |
} | |
else | |
#endif | |
{ | |
return NO; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment