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
Post a Comment