method_getTypeEncoding 使用@encode将消息编码成字符串形式。 编码的格式按照 id objc_msgSend(id self, SEL op, ...) 参量的顺序进行布局。 -(void)log:(SEL)sel { Method xxx = class_getInstanceMethod(self.class, sel); char *ret = method_getTypeEncoding(xxx); NSLog(@"sel:%s, %s", sel, r...
objc_msgSend method_getTypeEncoding 与 @encode ide代码人生 struct objc_method { SEL _Nonnull method_name OBJC2_UNAVAILABLE; char * _Nullable method_types OBJC2_UNAVAILABLE; IMP _Nonnull method_imp OBJC2_UNAVAILABLE; } @encode: 将数据类型编码成char*(字符串)形式 To assist the runtime syste...