This question already has an answer here:
When I want to see the order of the object method calls, I have to put logs each method I implemented like this.
- (void)updateTime:(float)time { NSLog(@"%s", __PRETTY_FUNCTION__);
Hence I have to put this code in every method on the class, and it's very boring to insert and delete so many log function calls every time I am debugging a class.
So how can I trigger NSLog(@"%s", __PRETTY_FUNCTION__);
in a class on each method call?
Edit:
I ended up with this code. And was not answered anywhere else.
- (BOOL)respondsToSelector:(SEL)aSelector { if(aSelector){ NSLog(@"%@", NSStringFromSelector(aSelector)); } return [super respondsToSelector:aSelector]; }