• 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: How to find what kind of Objects are contained in NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to find what kind of Objects are contained in NSArray


  • Subject: Re: How to find what kind of Objects are contained in NSArray
  • From: Mark Onyschuk <email@hidden>
  • Date: Sat, 10 Apr 2004 16:23:29 -0400

You can use -isKindOfClass: like so:

if ([myObject isKindOfClass:[NSArray class]]) {
} else ...

The isKindOf: method will test whether the receiver is an instance of the class or any of its subclasses. I believe (no docs infront of me, and I've rarely used it) that the method isInstanceOfClass: or somesuch will perform the more restricted test.

-Mark
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: NSURLConnection oddity
  • Next by Date: Re: How to make a transparent NSView answer events
  • Previous by thread: RE: How to find what kind of Objects are contained in NSArray
  • Next by thread: Re: [OT] WWDC accommodation
  • Index(es):
    • Date
    • Thread