19 #import "NimbusCore.h"
21 #if !defined(__has_feature) || !__has_feature(objc_arc)
22 #error "Nimbus requires ARC support."
25 #if __IPHONE_OS_VERSION_MAX_ALLOWED < NIIOS_6_0
26 const UIImageResizingMode UIImageResizingModeStretch = -1;
30 static NSInteger isPad = -1;
32 isPad = ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) ? 1 : 0;
38 static NSInteger isPhone = -1;
40 isPhone = ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) ? 1 : 0;
46 static NSInteger isTintColorGloballySupported = -1;
47 if (isTintColorGloballySupported < 0) {
48 UIView* view = [[UIView alloc] init];
49 isTintColorGloballySupported = [view respondsToSelector:@selector(tintColor)];
51 return isTintColorGloballySupported > 0;
55 return kCFCoreFoundationVersionNumber >= versionNumber;
59 return [[UIScreen mainScreen] scale];
67 return [UIPopoverController class];
71 return [UITapGestureRecognizer class];
BOOL NIIsPhone(void)
Checks whether the device the app is currently running on is an iPhone/iPod touch or not...
BOOL NIIsTintColorGloballySupported(void)
Checks whether the device supports tint colors on all UIViews.
BOOL NIIsRetina(void)
Returns YES if the screen is a retina display, NO otherwise.
Class NIUIPopoverControllerClass(void)
This method is now deprecated.
BOOL NIDeviceOSVersionIsAtLeast(double versionNumber)
Checks whether the device's OS version is at least the given version number.
BOOL NIIsPad(void)
Checks whether the device the app is currently running on is an iPad or not.
Class NIUITapGestureRecognizerClass(void)
This method is now deprecated.
CGFloat NIScreenScale(void)
Fetch the screen's scale.