Aspects icon indicating copy to clipboard operation
Aspects copied to clipboard

Question: Is it possible to "replace" the original invocation and perform it in a different context

Open avnerbarr opened this issue 8 years ago • 0 comments

I came across a situation where I need to replace a method with a private implementation but at a later time perform the original implementation (after my replaced block has run).

For instance:

[SomeViewController aspect_hookSelector:@selector(buttonWasPressed:) withOptions:AspectPositionInstead usingBlock:(id <AspectInfo> info) { // Do some things to the UI }];

// somewhere else in the code.... [invokeOriginalMethod buttonWasPressed]

How can I do this?

avnerbarr avatar Sep 24 '15 10:09 avnerbarr