我正在向我的应用程序添加滑动手势识别器
- (void)createGestureRecognizers
{
//adding swipe up gesture
UISwipeGestureRecognizer *swipeUpGesture= [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeUpGesture:)];
[swipeUpGesture setDirection:UISwipeGestureRecognizerDirectionUp];
[self.view addGestureRecognizer:swipeUpGesture];
[swipeUpGesture release];
}
以及处理滑动事件的方法:
-(IBAction)handleSwipeUpGesture:(UISwipeGestureRecognizer *)sender
{
NSLog(@"handleSwipeUpGesture: called");
}
我如何在这里计算偏移量?移动视图?