load initialize

+load()+initialize()总结
upload successful

  • load调用在main()之前
  • 可在load中对该类一些方法进行替换
1
2
3
4
5
6
7
+ (void)load
{
// Inject "-pushViewController:animated:"
Method originalMethod = class_getInstanceMethod(self, @selector(pushViewController:animated:));
Method swizzledMethod = class_getInstanceMethod(self, @selector(fd_pushViewController:animated:));
method_exchangeImplementations(originalMethod, swizzledMethod);
}