アプリケーションにスワイプジェスチャレコグナイザーを追加しています
- (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");
}
ここでオフセットを計算するにはどうすればよいですか?ビューを移動するには?