首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

Objective-C Runtime编程指南(2)

(Protocol *proto, const char *name, BOOL isRequiredProperty, BOOL isInstanceProperty) 您可以使用property_getAttributes...函数来发现属性的名称和@encode类型的字符串 const char *property_getAttributes(objc_property_t property) 把它们放在一起,你可以使用下面的代码打印一个与类关联的所有属性的...objc_property_t property = properties[i]; fprintf(stdout, "%s %s\n", property_getName(property), property_getAttributes...(property)); } 属性类型字符串 您可以使用property_getAttributes函数来发现名称,属性的@encode类型字符串以及属性的其他属性。...YorkshireTeaStruct YorkshireTeaStructType; union MoneyUnion { float alone; double down; }; 下表显示了示例属性声明和property_getAttributes

26010
领券