       let origIMPC = unsafeBitCast(origIMP, to: IMPType.self)
       let block: @convention(block) (AnyObject, CGRect, UIView) -> () = {
         if let firstResp = UIResponder.mik_firstResponder {
-          swizzle(class: type(of: firstResp))
+          swizzle(class: type(of: firstResp.mik_responderToSwizzle))
         } else {
-          swizzle(class: type(of: $2))
           // Must call `becomeFirstResponder` since there's no firstResponder yet
-          $2.becomeFirstResponder()
+          if let n = $2.mik_viewControllerInChain {
+            swizzle(class: type(of: n))
+            n.becomeFirstResponder()
+          } else {
+            swizzle(class: type(of: $2))
+            $2.becomeFirstResponder()
+          }
         }
 
         origIMPC($0, selector, $1, $2)

    _currentFirstResponder = self
  }

}

import ObjectiveC.runtime

// This is inspired by https://github.com/steipete/PSMenuItem
internal func swizzle(class klass: AnyClass) {
  objc_sync_enter(klass)
  defer { objc_sync_exit(klass) }
  let key: StaticString = #function
