I can\'t figure out why tapping on text fields and buttons in my view is not working. I\'ve checked all the obvious things like whether userInteractionEnabled is set to YES, whe
My full Swift Example following @Bryan Chen and @kelin Answer ...
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow? = TestWindow()
// ....
}
...
class TestWindow:UIWindow {
override func sendEvent(_ event: UIEvent) {
print(event)
// timestamp: 366545 touches: {(
// phase: Ended tap count: 1 force: 0.000
//window: ;
//layer = > view: ; layer = > location in
//window: {165, 358.33332824707031} previous location in window:
//{144.33332824707031, 358.66665649414062} location in view: {165,
//44.999992370605469} previous location in view: {144.33332824707031,
//45.333320617675781}
// )}
super.sendEvent(event)
}
}