投稿

11月, 2014の投稿を表示しています

【iOS】mapkitのmemo

ハマったのでmemo iOS7 iOS8 で確認 吹き出しタップ時のEvent ( void )mapView:( MKMapView *)mapView annotationView:( MKAnnotationView *)view calloutAccessoryControlTapped:( UIControl *)control  ピンタップ時のEvent -( void )mapView:( MKMapView *)mapView didSelectAnnotationView:( MKAnnotationView *)view 標準の吹き出しをOKにする。 annotationView. canShowCallout = YES ; 吹き出しの中のButtonの設定(これがないと吹き出しのタップEventが拾えない?) UIButton *bt = [ UIButton buttonWithType : UIButtonTypeDetailDisclosure ]; annotationView. rightCalloutAccessoryView = bt; Buttonのアイコンなら変更は可能。 [bt setImage :[ UIImage imageNamed : @”アイコンの名前” ] forState : UIControlStateNormal ];