这是我的代码:
UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(resignTextView)];
[self.tableview addGestureRecognizer:gestureRecognizer];
-(void)resignTextView
{
[textView resignFirstResponder];
}
我用UITapGetureRecognizer
. 我不知道为什么它不工作?