マップキットで、
ところで、画像を使用せずに、マップのピンヘッドのみを反映するように、ステムなしでピンを追加できるかどうか疑問に思っていました。
よろしくお願いします。
はい、可能です。そのためには、MKAnnotationView
の代わりに使用する必要がありMKPinAnnotationView
ます。また、annotation.animatesDrop プロパティを使用しないでください。
で使用できるサンプル コードは次のとおりですviewForAnnotation
。
annotation = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"try"];
annotation.canShowCallout = YES;
annotation.image = [UIImage imageNamed:@"image.png"];
return annotation;
お役に立てれば。
あなたはスタックオーバーフローにかなり慣れていないようです。この回答または他の回答を正しい回答としてマークしてください。