Created
July 19, 2012 05:21
-
-
Save ttsubono/3140938 to your computer and use it in GitHub Desktop.
端末のiOSのバージョンにより処理を分岐する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
English
http://stackoverflow.com/questions/1964776/how-to-determine-the-current-iphone-os-version-at-runtime-and-compare-version-st
http://forrst.com/posts/Runtime_iOS_Version_Checking-mOO
Japanese
http://d.hatena.ne.jp/nakamura001/20101211/1292066435
http://d.hatena.ne.jp/nakamura001/20100905/1283654296