Hello,
I'm trying to access the generic type of my NSArray property via reflection API.
Here's my defined property:
And here is my code how I access my the property via reflection:
propertyName = "tabs" is correct
attrs = "T@"NSArray",&,N,V_tabs"
It seems like there is no information about the generic type.
Also in the documentation I can't find any information about this case.
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW5
Isn't it possible to access the generic type of my NSArray property via reflection?
I'm trying to access the generic type of my NSArray property via reflection API.
Here's my defined property:
Code Block objective-c @property(nonatomic) NSArray<CustomObject*>* tabs;
And here is my code how I access my the property via reflection:
Code Block objective-c objc_property_t *properties = class_copyPropertyList(class, &propertyCount); for (unsigned int i = 0; i < propertyCount; i++) { objc_property_t property = properties[i]; objc_property_t property = properties[i]; const char *propertyName = property_getName(property); const char *attrs = property_getAttributes(property); }
propertyName = "tabs" is correct
attrs = "T@"NSArray",&,N,V_tabs"
It seems like there is no information about the generic type.
Also in the documentation I can't find any information about this case.
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW5
Isn't it possible to access the generic type of my NSArray property via reflection?