2012-03-28 7 views
0

を必要と明確化、私はタイプUISwipeGestureRecognizerのrecorgnierオブジェクトを依頼することができます*previousLocationInView、次の方法の一環として

- (void) handleSwipeFrom:(UISwipeGestureRecognizer*)recognizer 

現在の場所について

CGPoint currentLocation = [recognizer locationInView:self]; 

documentationによると、私もできるはずです取得する

CGPoint previousLocation = [recognizer previousLocationInView:self]; 

この方法は、利用可能です。私はどうしたらいいですか?

答えて

0

あなたは、私がpreviousLocationがGRのために廃止されていることを考える、または正確SwipeGR

0

のために私も同じ問題に直面した

[recognizer locationOfTouch:<#(NSUInteger)#> inView:<#(UIView *)#>] 

を使用して、以前の位置を取得することができます。..

私はUITouchを使用前の場所を取得するオブジェクト

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 
{ 
CGPoint pre_moveLocation ; 
UITouch *theTouch =[touches anyObject]; 
pre_moveLocation =[theTouch previousLocationInView:imageView; 
} 
関連する問題