Function

method_exchangeImplementations(_:_:)

Exchanges the implementations of two methods.

Declaration

func method_exchangeImplementations(_ m1: Method!, _ m2: Method!)

Discussion

This is an atomic version of the following:

IMP imp1 = method_getImplementation(m1);
IMP imp2 = method_getImplementation(m2);
method_setImplementation(m1, imp2);
method_setImplementation(m2, imp1);