0

私のiPhoneアプリでは、アラートボックスを表示するように長押しを設定しました。テストで長押しするとアラートが開きますが、消える前に「OK」を3回クリックする必要があります。1つだけではなく、3つの長押しアラートウィンドウを開いたようです。

私は何を間違っていますか?長押しを処理するために使用しているコードは次のとおりです。

- (void)didLongPress_imageButton3:(UILongPressGestureRecognizer *)recognizer {
  UIAlertView *alertView = [[UIAlertView alloc] init];
  alertView.title = @"The Info";
  alertView.message = @"Details of what is in the project.";
  [alertView addButtonWithTitle:@"OK"];
  [alertView show];
  [alertView release];
}
4

0 に答える 0