gpt4 book ai didi

iphone - 如何从以下方法获取新位置

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:18:22 26 4
gpt4 key购买 nike

-(void)mapView:(MKMapView *)mapView 
annotationView:(MKAnnotationView *)view
didChangeDragState:(MKAnnotationViewDragState)newState
fromOldState:(MKAnnotationViewDragState)oldState

最佳答案

你使用这个:

- (void)mapView:(MKMapView *)mapView 
annotationView:(MKAnnotationView *)annotationView
didChangeDragState:(MKAnnotationViewDragState)newState
fromOldState:(MKAnnotationViewDragState)oldState
{
if (newState == MKAnnotationViewDragStateEnding)
{
CLLocationCoordinate2D droppedAt = annotationView.annotation.coordinate;
NSLog(@"dropped at %f,%f", droppedAt.latitude, droppedAt.longitude);
}
}

MKAnnotationView 被放下时,这将为您提供最终位置的坐标。

关于iphone - 如何从以下方法获取新位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15196042/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com