Created
January 13, 2013 23:55
-
-
Save romyilano/4526921 to your computer and use it in GitHub Desktop.
A nice way to automatically turn your logs on and off instead of having to hand-erase them
This file contains hidden or 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
| // Do this in the -Prefix.pch file | |
| #ifdef __OBJC__ | |
| #import <UIKit/UIKit.h> | |
| #import <Foundation/Foundation.h> | |
| // From Matt Neuberg / from Jens Alfke | |
| // when you want the logs to be turned on then you set if(0) to 0 | |
| // when you want them turned off you set if(1) | |
| #define MyLog if(0); else NSLog | |
| #endif | |
| // then in your other files such as viewcontroller.m | |
| // use MyLog(@"sdfsdf %@", object); instead of NSLog | |
| // when you want t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment