I\'ve got a view and I applied a UIPanGestureRecogniser to this view:
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:sel
Above answers are all correct, this is just an updated one for Swift.
Swift 3:
func panGesture(recognizer: UIPanGestureRecognizer) { if recognizer.state == .ended { // Do what you want } }