I have been wondering for a couple of days if NSInvocation
should need the NSMethodSignature
.
Lets say we want to write our own NSInvocation, my requirements would be as so:
- I need a selector
SEL
- The target object to call the selector on
- The argument array
Then i would get the IMP
out from the target and the SEL
, and pass the argument
as parameters.
So, my question is, why do we need an NSMethodSignature
to construct and use an NSInvocation
?
Note: I do know that by having only a SEL
and a target, we dont have the arguments and return type for this method, but why would we care about the types of the args and returns?