0

私は自分の見解の1つにUIPanGestureを使用しようとしています。残念ながら、そのUIPanGestureのセレクターメソッドはトリガーされません。

ここに私のコード:

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

これは私のセレクターメソッドです:

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

友達のplsは私がここでやったのは間違っているというあなたの考えで私を提案します。

みんなありがとう、モニッシュ。

4

1 に答える 1

0

これを試して UIPanGestureRecognizer * panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleTransactionPan:)]; [self.graphView setUserInteractionEnabled:YES]; [self.graphView addGestureRecognizer:panRecognizer];

于 2012-04-22T06:28:23.417 に答える