RunTime 笔记

获取类的属性的真实类型

const char * attributes = property_getAttributes(property);
        NSString *attributesString = [NSString stringWithUTF8String:attributes];

打印attributesString得到:Ti,N,V_flightID

RunTime 笔记_第1张图片
属性的名称及意义
RunTime 笔记_第2张图片
T后面的类型对照表

苹果官方文档:https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html

你可能感兴趣的:(RunTime 笔记)