IDMPBConstants.h 1.2 KB

12345678910111213141516171819202122232425262728
  1. //
  2. // IDMPhotoBrowserConstants.h
  3. // PhotoBrowserDemo
  4. //
  5. // Created by Eduardo Callado on 10/7/13.
  6. //
  7. //
  8. #define PADDING 10
  9. #define PAGE_INDEX_TAG_OFFSET 1000
  10. #define PAGE_INDEX(page) ([(page) tag] - PAGE_INDEX_TAG_OFFSET)
  11. // Debug Logging
  12. #if 0 // Set to 1 to enable debug logging
  13. #define IDMLog(x, ...) NSLog(x, ## __VA_ARGS__);
  14. #else
  15. #define IDMLog(x, ...)
  16. #endif
  17. //
  18. // System Versioning Preprocessor Macros
  19. //
  20. //#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
  21. //#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
  22. //#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
  23. //#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
  24. //#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)