Current Selector’s Name

So… suppose you wanna log the name of the ‘current’ method. You could hardcode the method name, right there… virtually everywhere… or you can do this:

[cc lang=”objc”]
NSLog(@”[ %@ ] did something”, NSStringFromSelector(_cmd));
[/cc]

It’s simple. Yet, its something i didn’t know… three days ago!.