Re: class_respondsToSelector() in runtime.h?
Re: class_respondsToSelector() in runtime.h?
- Subject: Re: class_respondsToSelector() in runtime.h?
- From: Michael Ash <email@hidden>
- Date: Thu, 1 Jul 2010 12:05:53 -0400
On Wed, Jun 30, 2010 at 5:44 PM, Dave Carrigan <email@hidden> wrote:
>
> On Jun 30, 2010, at 2:35 PM, Laurent Daudelin wrote:
>
>> Well, isn't -respondsToSelector: an instance method?
>
>
> if ([[Someclass class] respondsToSelector:@selector(classSelector)]) {
> // yup
> }
An extremely minor nitpick: the use of +class here is necessary. You
can simply write [Someclass respondsToSelector:...]. The use of
[Someclass class] is only necessary when you want to use Someclass as
a value or parameter or such.
Mike
_______________________________________________
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