Re: substitute class at runtime?
Re: substitute class at runtime?
- Subject: Re: substitute class at runtime?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sat, 19 Jul 2008 13:03:36 +0200
Le 19 juil. 08 à 08:12, Kyle Sluder a écrit :
On Sat, Jul 19, 2008 at 1:10 AM, Andy Lee <email@hidden> wrote:
Am I misunderstanding?
No, I assure you that I'm the one who misunderstood. Although now the
question is why would one use an array of strings when one could use
an array of Class objects... maybe because the strings are coming from
elsewhere.
Because "one" don't now that "Class" are just NSObject and can be use
like any other objects.
Class cls = [MyViewController class];
BOOL isObject = [cls isKindOfClass:[NSObject class]]; // returns YES
And it even responds to copy and copyWithZone: and so can be used as a
key in an NSDictionary.
_______________________________________________
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