Oogamiです。Map関連のお話。
Map上にピンが上から「グサッ」と刺さるようなアニメーションをする方法です。
・MKPinAnnotationViewのanimatesDropプロパティをYESに設定する。
これだけです。簡単。
ピンの色も3色用意されていてMKPinAnnotationViewのpinColorに以下の
タイプを指定するだけです。
赤のピン)MKPinAnnotationColorRed
緑のピン)MKPinAnnotationColorGreen
紫のピン)MKPinAnnotationColorPurple
実際に使用する時は、
MKPinAnnotationView *= [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"MKAnnotationView"];
[annotationView setPinColor:MKPinAnnotationColorGreen];
[annotationView setAnimatesDrop:YES];
こんな感じです。
MapKitって楽しいです。遊べますよー。
- 関連記事
-
スポンサーサイト
trackbackURL:http://appteam.blog114.fc2.com/tb.php/107-166dc20f