我有办法处理我在别处宣布的双轮wi:
-(void)handleDoubleSwipe:(UISwipeGestureRecognizer *)recognizer
{
NSLog(@"double swiped");
if(recognizer.direction==UISwipeGestureRecognizerDirectionLeft) {
NSLog(@"swiped left");
}
if(recognizer.direction==UISwipeGestureRecognizerDirectionRight) {
NSLog(@"swiped right");
}
}
我宣布:
UISwipeGestureRecognizer *doubleSwipe=[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleDoubleSwipe:)];
doubleSwipe.numberOfTouchesRequired=2;
doubleSwipe.delegate=self;
doubleSwipe.direction=UISwipeGestureRecognizerDirectionRight | UISwipeGestureRecognizerDirectionLeft;
问题是,Im无法向甄选者提供任何参数。 这只是让我去做,使我能够完成零件工作。 我将如何在选择人的参数上添加双Swipe的姿态? 如今,操作的DoubleSwipe方法确实被叫去,国家行车监督记录仪显示的是“双血清”但确实显示左或右.。