It’s kind of like a boss-employee squabble

1. This method number is not implemented, what to do? Are you gonna do it or not?

+ (BOOL)resolveInstanceMethod:(SEL)sel; 
+ (BOOL)resolveClassMethod:(SEL)sel;
Copy the code

Return true: do it and everyone will be safe false: do not do it and go 2

2. Why don’t you help me find a guy to handle it

- (id)forwordingTargetForSelector:(SEL)sel
Copy the code

So I’m not going to bother me anymore whether I can do anything or not, and everything is going to go to the next object, return nil; Offer or go 3

3. Even if you can’t find someone to deal with it, garbage, tell me how this thing is done. I’ll do it to someone else, or I’ll Sue you.

- (NSMethodSignature *) methodSignatureForSelector: (SEL) SEL / / NSMethodSignature: by the parameter, the description of the return value, plus the SEL is enough to define a method type;Copy the code

Provide method signature object: everyone good together good break up do not provide boss mad

4. Post a job advertisement to find a contractor

- (void)forwordInvocation:(NSInvocation *)anInvocation
Copy the code

When you see that the return value is void, you kind of give up; This function means: this case, there is a leak to pick up the good, there is no throw away