Library
Constants.h
1 //
2 // Constants.h
3 // iSignatureOffice
4 //
5 // Created by Florian Student on 12/7/12.
6 // Copyright (c) 2012 Florian Student. All rights reserved.
7 //
8 
9 #define kNotSyncStarted @"kNotSyncStarted"
10 #define kNotSyncEnded @"kNotSyncEnded"
11 
12 #define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
13 #define IS_IPHONE (!IS_IPAD)
14 
15 
16 /*
17  * System Versioning Preprocessor Macros. From: http://stackoverflow.com/a/5337804/891330
18  */
19 #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
20 #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
21 #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
22 #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
23 #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
24 
25