тип свойства или класс с использованием отражения

Мне было интересно, возможно ли определить класс или примитивный тип свойств объекта. Получить все имена и значения свойств довольно легко.Так ответь

Так есть ли способ получить тип класса свойств, в то время как свойство не имеет значения или значения nil?

Пример кода

@interface MyObject : NSObject
@property (nonatomic, copy) NSString *aString;
@property (nonatomic, copy) NSDate *aDate;
@property                   NSInteger aPrimitive;
@end

@implementation MyObject
@synthesize aString;
@synthesize aDate;
@synthesize aPrimitive;

- (void)getTheTypesOfMyProperties {
    unsigned int count;
    objc_property_t* props = class_copyPropertyList([self class], &count);
    for (int i = 0; i < count; i++) {
        objc_property_t property = props[i];

        // Here I can easy get the name or value
        const char * name = property_getName(property);

        // But is there any magic function that can tell me the type?
        // the property can be nil at this time
        Class cls = magicFunction(property);
    }
    free(props);
}

@end

Ответы на вопрос(2)

Ваш ответ на вопрос