2012-04-22 8 views
0

私のビューの1つにUIPanGestureを使用しようとしています。残念ながら、そのUIPanGestureのセレクターメソッドはトリガーされません。iPhone sdk(iOS 5.1)でUIPanGestureセレクターメソッドが呼び出されない

ここに私のコード:

UIPanGestureRecognizer * panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleTransactionPan:)]; 
    [self.graphView addGestureRecognizer:panRecognizer]; 

これは私の選択方法である:

-(void)handleTransactionPan:(UIPanGestureRecognizer*)recognizer 
{ 
    NSLog(@"\n Inside Pan Gesture....."); 
} 

友達PLSのは、私がここでやった間違ったウルアイデア重量のを私に示唆しています。

ありがとうございました。 Monish。

答えて

0

試してみてください。この UIPanGestureRecognizer * panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleTransactionPan:)]; [self.graphView setUserInteractionEnabled:YES]; [self.graphView addGestureRecognizer:panRecognizer];

+0

はいそれは魅力のように働いている.. Tanq .. +1 –

関連する問題