UISwipeGestureRecognizer *swipeGestureRecognizer = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(resignTextView)];
swipeGestureRecognizer.direction=UISwipeGestureRecognizerDirectionDown;
swipeGestureRecognizer.numberOfTouchesRequired=1;
[self.tableview addGestureRecognizer:swipeGestureRecognizer];
-(void)resignTextView
{
[textView resignFirstResponder];
}
我不知道为什么 resignTextView 方法没有被调用?