Q:

Is there any way to get a property's type in Objective-C?

Possible Duplicate:
How to detect a property return type in Objective-C 

Is there any way to get a property's type in Objective-C?  I can access the property like this:
objc_property_t* properties = class_copyPropertyList(cl, &count);

And get the name like this:
property_getName(properties[i]);

What I need to do though is get the type.  Also, the value will be nil in most cases so I can't just get the value calling object_getClass().

A:

Not in the sense that you seem to be asking — in Objective-C classes are typeless; when dealing with non-C types beyond 'it's a class' the type of properties isn't known at runtime. That's why if you do something silly like the following in a view controller:
[self setValue:@3 forKey:@"view"];

You'll see an exception raised when the controller attempts to send a view message to the NSNumber rather than by the key-value coding mechanisms because you tried to put something that isn't a view into in an inappropriate property.
Parsing property_getAttributes will allow you to go no further than distinguishing the various C literal types from an Objective-C object type.

