Re: class_respondsToSelector() in runtime.h?
Re: class_respondsToSelector() in runtime.h?
- Subject: Re: class_respondsToSelector() in runtime.h?
- From: Greg Parker <email@hidden>
- Date: Wed, 30 Jun 2010 14:48:58 -0700
On Jun 30, 2010, at 2:42 PM, Laurent Daudelin wrote:
> Yes, I know that, but can you send an instance method to a class object?
Yes, you can. Every class object is itself an instance of NSObject. Therefore, every class object also responds to all of NSObject's instance methods.
http://sealiesoftware.com/blog/archive/2009/04/14/objc_explain_Classes_and_metaclasses.html
(Pedantically, every class object is itself an instance of its root class. But to a close approximation that root class is always NSObject.)
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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