Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

namanhams

macrumors regular
Original poster
Jun 3, 2009
153
0
I have an object of type (id). This object is either a ABRecordRef, or an instance of a class that is subclass of NSObject.

How do i determine the real type of this object ?
Thanks.
 

Reason077

macrumors 68040
Aug 14, 2007
3,606
3,644
ABRecordRef is a C type - it should not be stored in the ObjC type "id"!

Normally, if you want to test if an ObjC object is a particular class, you do it like the following:

"if ([obj isKindOfClass: [MyObjCClass class]]) ..."

But again, you should not be calling isKindOfClass (or any other ObjC method) on an instance of ABRecordRef - it is not an ObjC type.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.