Skip to content

Instantly share code, notes, and snippets.

@jchavarri
Created March 11, 2013 16:00
Show Gist options
  • Save jchavarri/5135277 to your computer and use it in GitHub Desktop.
Save jchavarri/5135277 to your computer and use it in GitHub Desktop.
iOS preprocessor constants
#define DOCUMENTS_PATH [NSHomeDirectory() stringByAppendingString:@"/Documents/"]
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
// ALog always displays output regardless of the DEBUG setting
#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#define isIPad2 (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad && [UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment