2013. 2. 1. 11:48

iOS 버전 체크 매크로

#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)


'아이폰' 카테고리의 다른 글

NSString의 유용한 메서드 몇가지  (0) 2013.01.15
iOS & Android MD5 Hash  (0) 2012.11.19
[IOS] 이미지를 서버로 업로드하기  (2) 2012.02.28
[Objective C] Tabbar Custom 하기  (0) 2012.02.22
앱 내에서 카카오톡 호출하기  (0) 2012.02.11