当 UITextView 被点击时,我希望它继续作为第一响应者工作,但我还需要触发其他事件。在 UITextView 不是第一响应者之前,UITapGestureRecognizer 工作得很好,但是在它获得焦点之后,点击不再被识别。
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapRecognized:)];
singleTap.numberOfTapsRequired = 1;
[txtView addGestureRecognizer:singleTap];
[singleTap release];
-(IBAction)singleTapRecognized:(id)sender
{
//Does not enter here with a tap after txtView is first responder
}