Add UIPangestureRecognizer to open and close Menu

How to make gestures to work better?