Permalink
Browse files

[core] Modernize NIIsPad.

  • Loading branch information...
1 parent a9b8ce1 commit 00713ca48870d90b4a2d7a45212b22b6e14fd0b4 @jverkoey jverkoey committed Aug 13, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 src/core/src/NISDKAvailability.m
View
6 src/core/src/NISDKAvailability.m
@@ -28,15 +28,11 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
BOOL NIIsPad(void) {
-#ifdef UI_USER_INTERFACE_IDIOM
static NSInteger isPad = -1;
if (isPad < 0) {
- isPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
+ isPad = ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) ? 1 : 0;
}
return isPad > 0;
-#else
- return NO;
-#endif
}

0 comments on commit 00713ca

Please sign in to comment.