romaonthego / REFrostedViewController

iOS 7/8 style blurred view controller that appears on top of your view controller.
MIT License
2.97k stars 494 forks source link

Gesture problems with UITableView #59

Closed vleango closed 10 years ago

vleango commented 10 years ago

When panGesture is enabled, the top controller (has a tableView inside) doesn't scroll up and down properly on same cells (pretty random cells). When this occurs, the menu's pan gesture is triggered instead.

I have also noticed this problem when the Left Menu has a table view.

I have been trying to get it to work for both gestures, but not successful so far.

mdpp commented 10 years ago

I'm having the same issue. Any hint on how to solve it (or any workaround)?

topchul commented 10 years ago

@vleango @mdpp UIScrollView(also UITableView) is implemented with the panGestureRecognizer. The gesture's priority based on view hierarchy(superview : first).

so, The examples set up a panGesture to the DEMONavigationConroller. It will be firing before UiTableView's gestures.

Good Luck.

vleango commented 10 years ago

hi @topchul , thanks for the comment. I like the second option. I haven't tried it yet, but if I run into any problems then I will report back.

CianApple commented 9 years ago

I had this issue as well. But I have a very simple implementation for this issue. The logic used by me in DemoNavigationController:

Instead of: [self.view addGestureRecognizer:[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureRecognized:)]];

Use: UIView *vw_pan = [[UIView alloc] initWithFrame:CGRectMake(0, self.navigationBar.frame.size.height + [UIApplication sharedApplication].statusBarFrame.size.height, 40, self.view.frame.size.height)]; vw_pan.backgroundColor = [UIColor clearColor]; [self.view addSubview:vw_pan]; [vw_pan addGestureRecognizer:[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureRecognized:)]];

This means decrease the pangesture from full screen to a limited area in the left edge of the screen. Hope it helps.