Re: get class of a method
Re: get class of a method
- Subject: Re: get class of a method
- From: Ken Thomases <email@hidden>
- Date: Sun, 22 Feb 2015 15:13:46 -0600
On Feb 22, 2015, at 3:01 PM, Jack Brindle <email@hidden> wrote:
> Doesn’t [self class] do this? The method is within whatever self is, so it seems appropriate that [self class]
> would provide what you want.
Although the subject wasn't clear, the body makes it clear he's looking for the return type of a method.
But even if he were looking for the class which implemented the method, [self class] would not be correct. That returns the dynamic type of the object, which may be a subclass of the class which implemented the method.
Regards,
Ken
_______________________________________________
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