How to target a specific iPhone version? -
I have some code that I just want to execute on the latest iPhone SDK (3.0), although I do not think so To remove a way to target 3.0 and ignore 2.2.1 Here is an ifdef statement, but it seems to cover the whole iPhone:
#if TARGET_OS_IPHONE Any help is appreciated is.
You can use #define to change it that you create for each SDK. .
#if __IPHONE_OS_VERSION_MIN_REQUIRED> To run the code for __IPHONE_2_2 // iPhone 3.0 code here #endif and 3.0 and above, do this at run-time:
Float version = [[[UIDewis current device] SystemWarson] float value]; If (version> = 3.0) {// iPhone 3.0 code here}
Comments
Post a Comment