Aspects
Aspects copied to clipboard
Question: Is it possible to "replace" the original invocation and perform it in a different context
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?