• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Instantiating an object by class from an NSString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Instantiating an object by class from an NSString?


  • Subject: Re: Instantiating an object by class from an NSString?
  • From: Omar Qazi <email@hidden>
  • Date: Fri, 10 Feb 2006 21:02:52 -0800

You could also use [NSBundle classNamed:@"NSString"];

On Feb 10, 2006, at 8:22 PM, M. Carlson wrote:

If I have the class namestring of a Cocoa class in an NSString, e.g., like this:

NSString *myClassName = @"NSArray";

...how can I use the class specified in variable 'myClassName' to instantiate a member of this class (in this example, an NSArray)?

--M


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40roflsoftware.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Instantiating an object by class from an NSString? (From: "M. Carlson" <email@hidden>)

  • Prev by Date: Re: Instantiating an object by class from an NSString?
  • Next by Date: Re: Is C's parameter passing more-efficient than ObjC's message passing?
  • Previous by thread: Instantiating an object by class from an NSString?
  • Next by thread: Re: Instantiating an object by class from an NSString?
  • Index(es):
    • Date
    • Thread