拦截方法并替换成自己的方法
#import <objc/runtime.h>
Method method1 = class_getInstanceMethod([self class],@selector(didAddSubview:));
Method method2 = class_getInstanceMethod([self class], @selector(didModifyRange:));
method_exchangeImplementations(method1, method2);
--------------> 如果博客类容有误
--------------> 欢迎各位指正