romaonthego / RESideMenu

iOS 7/8 style side menu with parallax effect.
MIT License
7.09k stars 1.35k forks source link

[suggestion] A better Pan Gesture control #69

Closed ugenlik closed 10 years ago

ugenlik commented 11 years ago

So I had a calendar where user can drag between dates and its uses pangestures. Since I have added RESideMenu, that calendar stopped working even though I [self.sideMenuViewController setPanGestureEnabled:NO];

Then I put all the sidemenu gestures in an temp array and used current viewcontrollers gestures, once viewdisappears I assign gestures back to sidemenu

Maybe this will help someone having similar issues.

@property (nonatomic, strong) NSArray *keepGestureRecogs;

-(void)viewDidLoad { //first try save gesture recognizers in an array self.keepGestureRecogs=[[NSArray alloc] init]; self.keepGestureRecogs=self.sideMenuViewController.view.gestureRecognizers;

//second
[self.sideMenuViewController setPanGestureEnabled:NO];
self.sideMenuViewController.view.gestureRecognizers=self.view.gestureRecognizers;

}

-(void)viewWillDisappear:(BOOL)animated {

self.sideMenuViewController.view.gestureRecognizers=self.keepGestureRecogs;
[self.sideMenuViewController setPanGestureEnabled:YES];

}

mbcoder17 commented 10 years ago

I was having the same issue with my tableview!

Thank you very much!

h3im2o commented 10 years ago

hello , could you clarify a bit more this methode please : i put this lines in the view controller where i have the segmented control (which caused the issue for me ). but it still there :/ ! Best Regards,

mbcoder17 commented 10 years ago

I'm having issues implementing this as well...

romaonthego commented 10 years ago

Fixed in 4.0.