Skip to content

Instantly share code, notes, and snippets.

@masbog
Created April 17, 2013 02:52
Show Gist options
  • Select an option

  • Save masbog/5401417 to your computer and use it in GitHub Desktop.

Select an option

Save masbog/5401417 to your computer and use it in GitHub Desktop.
Objective-C Macro write log for calling function
#define logC NSLog(@"%@", NSStringFromSelector(_cmd));
#define logP NSLog(@"%s", __PRETTY_FUNCTION__);
//example to use
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
logC;
logP;
}
//what heppened? you must try this at home :)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment