My table view has a text field above it. And whenever the text field is focussed, a swipe gesture is registered. When the swipe gesture is recognized, the keyboard is dismissed. The code is working for all gestures except for swipe up gesture is not working. This is my code

```
swipe = [[UISwipeGestureRecognizer alloc]
         initWithTarget:self action:@selector(dismissKeyboard)];

[swipe setDirection:UISwipeGestureRecognizerDirectionUp];

```

Can someone please let me know if there is any problem?