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

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c++ - CryptStringToBinary API behavior -