运行时互换函数

    Method method1 = class_getInstanceMethod([TWPerson class], @selector(run));
    Method method2 = class_getInstanceMethod([TWPerson class], @selector(study));
    method_exchangeImplementations(method1, method2);

你可能感兴趣的:(运行时互换函数)