Skip to content

Instantly share code, notes, and snippets.

@pjaspers
Created July 14, 2011 19:48
Show Gist options
  • Save pjaspers/1083277 to your computer and use it in GitHub Desktop.
Save pjaspers/1083277 to your computer and use it in GitHub Desktop.
iPad check
// 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