I'm debugging code to see why a WKWebView's instance doesn't become the firstResponder by doing the following:
override func becomeFirstResponder() -> Bool {
let becomeFirstResponserResponse = super.becomeFirstResponder()
print(becomeFirstResponserResponse, self.isFirstResponder)
return becomeFirstResponserResponse
}
This prints out true, false
. I've also verified that the web view's window
property isn't nil
.
As per Apple's documentation, becomeFirstResponder
returns true if this object is now the first responder; otherwise, false.
. So I'd expect self.isFirstResponder
to be true
. What am I understanding incorrectly?