0

我的Ecslidingviewcontroller项目有问题,如果我将 Uislider 插入视图中,我不能很好地触摸它,因为滑块的滑动运动被误认为是向左/向右滑动。这是 viewWillApper 上的代码:

    if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
    self.slidingViewController.underLeftViewController  = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
  }

  if (![self.slidingViewController.underRightViewController isKindOfClass:[UnderRightViewController class]]) {
    self.slidingViewController.underRightViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"UnderRight"];
  }

  [self.view addGestureRecognizer:self.slidingViewController.panGesture];

有没有办法禁用滑块上的视图效果?非常感谢!

4

1 回答 1

0

将手势识别器移动到导航栏

[_navBarOutlet addGestureRecognizer:self.slidingViewController.panGesture];

或删除此行

[self.view addGestureRecognizer:self.slidingViewController.panGesture];

并添加这个

self.slidingViewController.shouldAddPanGestureRecognizerToTopViewSnapshot = YES;
于 2013-02-25T09:17:59.937 回答