gpt4 book ai didi

iphone - MapKit iPhone 开发 - 向 map 添加注释 - iOS SDK

转载 作者:行者123 更新时间:2023-12-03 19:45:09 24 4
gpt4 key购买 nike

我想在 map 上创建注释,如下所示:
img

如果您单击蓝色箭头,则会打开一个菜单。菜单中应该有两个菜单点。第一个是电话号码(如果我点击 iphone 调用/调用这个号码的号码),第二个是“到这里的路线”。

目前我运行这段代码

MKCoordinateRegion region4 = { {0.0, 0.0 }, { 0.0, 0.0 } }; 
region4.center.latitude = 48.13479 ;
region4.center.longitude = 11.582111;
region4.span.longitudeDelta = 0.01f;
region4.span.latitudeDelta = 0.01f;

DisplayMap *ann4 = [[DisplayMap alloc] init];
ann4.title = @"The Title!";
ann4.subtitle = @"The Subtitle!";
ann4.coordinate = region4.center;
[mapView addAnnotation:ann4];

如何显示如图所示的蓝色箭头?你能就此向我提出建议吗?

最佳答案

您必须在 MKAnnotationViewrightCalloutAccessoryView 中添加 UIButtonTypeDetailDisclosure 类型的 UIButton

关于iphone - MapKit iPhone 开发 - 向 map 添加注释 - iOS SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5448451/

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