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

Commit

Permalink
Merge pull request #90 from morizotter/morizotter/remove-navigation-s…
Browse files Browse the repository at this point in the history
…wizzle

Remove navigation push swizzle
  • Loading branch information
morizotter authored May 6, 2018
2 parents c9c8b2f + 8e01765 commit 1afdcd7
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 1afdcd7

Please sign in to comment.