MKMapPoint に uiview を追加することは可能ですか?私が試したコードを以下に示しますが、機能しません。どんな助けでも大歓迎です。
-(IBAction)foundTap:(UITapGestureRecognizer *)recognizer
{
CGPoint point = [recognizer locationInView:self.myMapView];
CLLocationCoordinate2D tapPoint = [self.myMapView convertPoint:point toCoordinateFromView:self.view];
MKMapPoint myMapPoint = MKMapPointForCoordinate(tapPoint);
UIView *mymapview=[[UIView alloc]initWithFrame:CGRectMake(myMapPoint.x, myMapPoint.y, 20, 20)];
mymapview.backgroundColor=[UIColor greenColor];
[self.view addSubview:mymapview];
}
ありがとう。