Re: class_respondsToSelector() in runtime.h?
Re: class_respondsToSelector() in runtime.h?
- Subject: Re: class_respondsToSelector() in runtime.h?
- From: Dave DeLong <email@hidden>
- Date: Thu, 01 Jul 2010 10:08:50 -0600
For more information: http://stackoverflow.com/questions/3107213
Dave
On Jul 1, 2010, at 10:05 AM, Michael Ash wrote:
> 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.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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