I want to swizzle a function in objective-c. The problem is that - I know the function that needs to be swizzled only at runtime. Now different methods in the code will have different return types, input params etc.
How should I write a (generic) code that, if given the name of the function and class to which it belong, I can create a block and then use imp_implementationWithBlock to create IMP and then swizzle original method with this newly created IMP.