removeGestureRecognizer method

ios, uigesturerecognizer

Solution

this should do it

while (myButton.gestureRecognizers.count) {
    [myButton removeGestureRecognizer:[myButton.gestureRecognizers objectAtIndex:0]];
}

Problem

I've created a UIButton with multiple Gestures. Is there a way to remove ALL gesture Recognizers? Without the gesture recognizer object? I've looked at this method: ``` [myButton removeGestureRecognizer:(GestureRecongizer)]; ``` However I don't have the Gesture recognizer object anymore. Is there a way to clean out my gestures without the recognizer object? Similiar to: ``` [myButton removeTarget:nil action:NULL forControlEvents:UIControlEventAllEvents]; ```

Original source