给控制器 增加分类
+ (void)load
{
#ifdef DEBUG
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Class cls = [self class];
Method m1 = class_getInstanceMethod(cls, @selector(viewDidAppear:));
Method m3 = class_getInstanceMethod(cls, @selector(viewDidAppear_EverPath));
method_exchangeImplementations(m1, m3);
});
#endif
}
- (void)viewDidAppear_EverPath
{
[self viewDidAppear_EverPath];
NSLog(@"当前VC控制器:%s\n",NSStringFromClass(self.class).UTF8String);
}