step1 调用+ (BOOL)resolveInstanceMethod:(SEL)selector 方法
此方法中通过class_addMethod 将选择子关联已实现的c方法
@dynamic属性的实现方式
step2 备援接收者 fowardingTargetForSelector:
只能转发 Target
step3 完整的消息转发 forwardInvocation:
- (void)forwardInvocation:(NSInvocation *)invocation
转发的时候可以作调整:追加参数,改换选择子等等
NSMethodSignature 对象用来获取方法签名 参考
网友评论