swiftuitextviewtouchesbegan

touchesBegan not called on UITextField


I have created a simple test project with a single UITextView and the touchesBegan method in the view controller. For some reason, the UITextView is not responding to touchesBegan.

Things I have tried:

I found similar questions in several places, but none of the solutions have worked.


Solution

  • While it seems like others have successfully gotten touchesBegan to work on a UITextField in the past, nothing seems to be working now. Instead, I simply added textFieldDidBeginEditing and canceled the animation from there. Problem solved.