Why to use UITapGestureRecognizer
, better to use UITextFieldDelegate
methods
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView{
//Do what you need to do...
}
OR
You can wrap up your textView
in a UIView
and add the UITapGestureRecognizer
on that view.