-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
你好,想请教一下,在Method Resolution部分里的这个方法内:
+ (BOOL)resolveInstanceMethod:(SEL)sel {
if (sel == @selector(sendMessage:)) {
class_addMethod([self class], sel, imp_implementationWithBlock(^(id self, NSString *word) {
NSLog(@"method resolution way : send message = %@", word);
}), "v@*");
}
return YES;
}
我知道在class_addMethod()函数里的最后一个参数Type Encoding中,v代表方法的返回值void,*代表方法的参数是NSString类型,@代表'an object'放在这里应该怎么理解呢?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels