1

これは私のコードですが、機能していません


`- (void)webViewDidFinishLoad:(UIWebView *)webView
{
    UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
    longPress.minimumPressDuration = 2;

[self.webview addGestureRecognizer:longPress];
[longPress release];

}

  • (void)longPress:(UILongPressGestureRecognizer*)gesture { if ( gesture.state == UIGestureRecognizerStateEnded ) { NSLog(@"Long Press");

    //do something

}} `

4

0 に答える 0