清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
#if DEBUG public override class func initialize(){ struct UIWindow_SwizzleToken { static var onceToken:dispatch_once_t = 0 } dispatch_once(&UIWindow_SwizzleToken.onceToken) { () -> Void in Chaos.hookMethod(UIWindow.self, originalSelector: Selector("makeKeyAndVisible"), swizzleSelector: Selector("vcMakeKeyAndVisible")) Chaos.hookMethod(UIView.self, originalSelector: Selector("willMoveToSuperview:"), swizzleSelector: Selector("vcWillMoveToSuperview:")) Chaos.hookMethod(UIView.self, originalSelector: Selector("willRemoveSubview:"), swizzleSelector: Selector("vcWillRemoveSubview:")) Chaos.hookMethod(UIView.self, originalSelector: Selector("didAddSubview:"), swizzleSelector: Selector("vcDidAddSubview:")) } } #endif