ios - Ignore UIPanGesture in UIViewController -


i have uinavigationcontroller has uipangesturerecognizer:

mynavcontroller.m ...  menugesture.delegate = self; [self.view addgesturerecognizer:menugesture]; 

it works great, need ignore uipangesturerecognizer in 1 of topviewcontrollers. tried self.view.gesturerecognizers = nil, didn't work.

if need enable/disable gesture recognizers have added in controllers, 1 approach exposing gesture recogniser through property , enable/disable @ will:

@property(nonatomic, assign/weak) uipangesturerecognizer* mygesturerecognizer; 

...

[(mynavcontroller*)mycontroller.navigationcontroller mygesturerecognizer].enabled = no; 

(of course, menugesture stored in mygesturerecognizer work).


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -