You should look into Method Swizzling. It helps you change the functions/function bodies at run time.
There is a great tutorial here.