Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
Remove navigation push swizzle
Browse files Browse the repository at this point in the history
  • Loading branch information
morizotter committed May 6, 2018
1 parent c9c8b2f commit 8e01765
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions TouchVisualizer/UIWindow+Swizzle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ extension UIWindow {
)
method_exchangeImplementations(sendEvent!, swizzledSendEvent!)

let pushEvent = class_getInstanceMethod(
UINavigationController.classForCoder(),
#selector(UINavigationController.pushViewController(_:animated:))
)
let swizzledPushEvent = class_getInstanceMethod(
UINavigationController.classForCoder(),
#selector(UINavigationController.swizzledPushViewController(_:animated:))
)
method_exchangeImplementations(pushEvent!, swizzledPushEvent!)

isSwizzled = true
}
}
Expand All @@ -46,10 +36,3 @@ extension UIWindow {
swizzledSendEvent(event)
}
}

extension UINavigationController {
@objc public func swizzledPushViewController(_ viewController: UIViewController, animated: Bool) {
Visualizer.sharedInstance.removeAllTouchViews()
swizzledPushViewController(viewController, animated: animated)
}
}

0 comments on commit 8e01765

Please sign in to comment.