Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS7中的滑动手势控制问题_Ios_Iphone_Ios7_Gesture - Fatal编程技术网

iOS7中的滑动手势控制问题

iOS7中的滑动手势控制问题,ios,iphone,ios7,gesture,Ios,Iphone,Ios7,Gesture,在我的应用程序中,我使用滑动手势控制。我有一个表视图和一个视图控制器。 我的视图设计如下:- 当滑动时,它会工作得很好。但问题是,当快速滑动时,它有时会显示为重叠的条形按钮 解决方案是什么?我刚刚试过这个代码 if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { self.navigationController.interactivePopGes

在我的应用程序中,我使用滑动手势控制。我有一个表视图和一个视图控制器。 我的视图设计如下:- 当滑动时,它会工作得很好。但问题是,当快速滑动时,它有时会显示为重叠的条形按钮 解决方案是什么?我刚刚试过这个代码

 if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
    self.navigationController.interactivePopGestureRecognizer.enabled = YES;

}
我还使用了表视图中隐藏后退按钮的代码
这在我的项目中不起作用。请帮助我在viewDidLoad的view controller中发布此代码

UISwipeGestureRecognizer *swipeLeft =[[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipeLeft:)];
swipeLeft.direction =UISwipeGestureRecognizerDirectionRight;
[self.view addGestureRecognizer:swipeLeft];

UISwipeGestureRecognizer *swipeRight =[[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipeRight:)];
swipeRight.direction =UISwipeGestureRecognizerDirectionLeft;
[self.view addGestureRecognizer:swipeRight];
Swipelft:和swipeRight的放置方法:

希望这对你有帮助

swipeLeft:和swipeRight的代码:

-(IBAction)swipeLeft:(id)sender
{
            CView *view =[[CView alloc]initWithNibName:@"CView" bundle:Nil];
            CATransition *animation = [CATransition animation];
            [self.navigationController pushViewController:view animated:NO];
            [animation setDuration:0.30];
            [animation setType:kCATransitionPush];
            [animation setSubtype:kCATransitionFromLeft];
            [[view.view layer] addAnimation:animation forKey:@"CView"];
}
-(IBAction)swipeRight:(id)sender
{
        EView *view =[[EView alloc]initWithNibName:@"EView" bundle:Nil];
        view.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
        [self.navigationController pushViewController:view animated:YES];;
        [view release];
}

希望这将帮助您使用以下方法。当你刷卡时它会呼叫

希望这对你有帮助

- (void)swipeLeft:(UITapGestureRecognizer *)recognizer{
    // Insert your own code to handle swipe left
}
- (void)swipeRight:(UITapGestureRecognizer *)recognizer {
    // Insert your own code to handle swipe right
}

请尝试以下操作:
[MySwipePirse RequiremeTestureRecognitizerToFail:self.navigationController.InteractivePostureRecognitizer]
在if案例中。它不起作用。再次显示相同的错误此方法在swipeIt移动到查看控制器时没有调用它将更快我刚刚尝试了以下代码-(void)swipeLeft:(id)sender{[self.navigationController PopViewControllerInitiated:是];}请指定CView和eview这是您必须提供的xib名称。或者您可以将其应用于当前视图。这只是一个示例,您必须输入自己的代码@PraphinSP@PraphinSP在ios7中,默认布局不需要设置任何内容。只需从AppDelegate将导航控制器添加到根视图控制器。。