Re: How to get the name of a method at runtime?
Re: How to get the name of a method at runtime?
- Subject: Re: How to get the name of a method at runtime?
- From: Jonathan Dann <email@hidden>
- Date: Sun, 9 Mar 2008 16:01:41 +0000
I think maybe you missed the existence of _cmd. Both self (this
object) and
_cmd (this selector) are passed as implicit arguments to every
Objective-C
method.
You can also call __func__ from within a method call, I use this often,
NSLog(@"%p %s",self,__func__); // Thanks James Bucanek
Jon
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden