返回顶部

收藏

ViewChaos,强大的IOS UI开发工具,调试UI非常给给力

更多
#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

标签:lua

收藏

0人收藏

支持

0

反对

0

发表评论