- unsigned int propertyCount = 0;
- objc_property_t *properties = class_copyPropertyList([类名 class], &propertyCount);
- for (unsigned int i = 0; i < propertyCount; ++i) {
- objc_property_t property = properties[i];
- const char * name = property_getName(property);//获取属性名字
- const char * attributes = property_getAttributes(property);//获取属性类型
- }
char *property_copyAttributeValue(objc_property_t property, const char *attributeName)
id objc_getAssociatedObject(id object, const void *key)