Click here to support Nimbus development and make a donation at www.pledgie.com !
An iOS framework whose growth is bounded by O(documentation).
SDK Availability

Overview

For checking SDK feature availibility.

NIIOS macros are defined in parallel to their __IPHONE_ counterparts as a consistently-defined means of checking __IPHONE_OS_VERSION_MAX_ALLOWED.

For example:

     #if __IPHONE_OS_VERSION_MAX_ALLOWED >= NIIOS_3_2
       // This code will only compile on versions >= iOS 3.2
     #endif
 

Defines

#define NIIOS_2_0   20000
#define NIIOS_2_1   20100
#define NIIOS_2_2   20200
#define NIIOS_3_0   30000
#define NIIOS_3_1   30100
#define NIIOS_3_2   30200
#define NIIOS_4_0   40000
#define NIIOS_4_1   40100
#define NIIOS_4_2   40200
#define NIIOS_4_3   40300
#define NIIOS_5_0   50000

Functions

BOOL NIIsPad (void)
BOOL NIDeviceOSVersionIsAtLeast (double versionNumber)
CGFloat NIScreenScale (void)
Class NIUIPopoverControllerClass (void)
Class NIUITapGestureRecognizerClass (void)

Define Documentation

#define NIIOS_2_0   20000

Released on July 11, 2008.

Definition at line 46 of file NISDKAvailability.h.

#define NIIOS_2_1   20100

Released on September 9, 2008.

Definition at line 51 of file NISDKAvailability.h.

#define NIIOS_2_2   20200

Released on November 21, 2008.

Definition at line 56 of file NISDKAvailability.h.

#define NIIOS_3_0   30000

Released on June 17, 2009.

Definition at line 61 of file NISDKAvailability.h.

#define NIIOS_3_1   30100

Released on September 9, 2009.

Definition at line 66 of file NISDKAvailability.h.

#define NIIOS_3_2   30200

Released on April 3, 2010.

Definition at line 71 of file NISDKAvailability.h.

#define NIIOS_4_0   40000

Released on June 21, 2010.

Definition at line 76 of file NISDKAvailability.h.

#define NIIOS_4_1   40100

Released on September 8, 2010.

Definition at line 81 of file NISDKAvailability.h.

#define NIIOS_4_2   40200

Released on November 22, 2010.

Definition at line 86 of file NISDKAvailability.h.

#define NIIOS_4_3   40300

Released on March 9, 2011.

Definition at line 91 of file NISDKAvailability.h.

#define NIIOS_5_0   50000

Release TBD.

Definition at line 96 of file NISDKAvailability.h.


Function Documentation

BOOL NIIsPad ( void  )

Checks whether the device the app is currently running on is an iPad or not.

Returns:
YES if the device is an iPad.

Definition at line 23 of file NISDKAvailability.m.

BOOL NIDeviceOSVersionIsAtLeast ( double  versionNumber)

Checks whether the device's OS version is at least the given version number.

Useful for runtime checks of the device's version number.

Parameters:
versionNumberAny value of kCFCoreFoundationVersionNumber.
Attention:
Apple recommends using respondsToSelector where possible to check for feature support. Use this method as a last resort.

Definition at line 37 of file NISDKAvailability.m.

CGFloat NIScreenScale ( void  )

Fetch the screen's scale in an SDK-agnostic way.

This will work on any pre-iOS 4.0 SDK.

Pre-iOS 4.0: will always return 1. iOS 4.0: returns the device's screen scale.

Definition at line 43 of file NISDKAvailability.m.

Class NIUIPopoverControllerClass ( void  )

Safely fetch the UIPopoverController class if it is available.

The class is cached to avoid repeated lookups.

Uses NSClassFromString to fetch the popover controller class.

This class was first introduced in iOS 3.2 April 3, 2010.

Attention:
If you wish to maintain pre-iOS 3.2 support then you must use this method instead of directly referring to UIPopoverController anywhere within your code. Failure to do so will cause your app to crash on startup on pre-iOS 3.2 devices.

Definition at line 60 of file NISDKAvailability.m.

Class NIUITapGestureRecognizerClass ( void  )

Safely fetch the UITapGestureRecognizer class if it is available.

The class is cached to avoid repeated lookups.

Uses NSClassFromString to fetch the tap gesture recognizer class.

This class was first introduced in iOS 3.2 April 3, 2010.

Attention:
If you wish to maintain pre-iOS 3.2 support then you must use this method instead of directly referring to UIPopoverController anywhere within your code. Failure to do so will cause your app to crash on startup on pre-iOS 3.2 devices.

Definition at line 72 of file NISDKAvailability.m.

Generated for Nimbus by doxygen 1.7.4-20110629