Maps.appでも同じように動作します。タップして2〜2秒間押し続けると、そこにピンがドロップされます。地図をタップ&ホールドしてイベントを作成するにはどうすればよいですか?
ここにコードを添付します(注釈を処理するにはLongPressが必要ですが、このコードでは機能しません)。お手伝いをしてください。
MKPinAnnotationView* pinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:MeAnnotationIdentifier] autorelease];
pinView.canShowCallout = NO;
UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(showCountdown:)];
[pinView addGestureRecognizer:longPressGesture];
[longPressGesture release];
コードの作成を開始したことがありますか?これは現在の考えですか? –
@Dan Ray:別の問題が発生しました。問題の本文のコードをご覧ください。イベントは発生しません。 – buh