在iphone mkmapview中获取地图的当前位置

我怎么能得到在mkmapview的位置坐标根据用户在他们的iphone上触摸地图上的位置?

将TapGesture添加到您的地图视图并按照以下代码进行操作

-(void)didTouchMap:(UITapGestureRecognizer*)tapGesure { CGPoint touchPoint = [tapGesure locationInView:selectLocationMapView]; CLLocationCoordinate2D coord= [selectLocationMapView convertPoint:touchPoint toCoordinateFromView:selectLocationMapView]; NSLog(@"lat %f",coord.latitude); NSLog(@"long %f",coord.longitude); }