如何抑制“当前位置"?地图视图中的标注 [英] How to suppress the "Current Location" callout in map view

查看:110
本文介绍了如何抑制“当前位置"?地图视图中的标注的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

点击代表userLocation的蓝色圆形圆圈,将弹出当前位置"标注.有办法抑制这种情况吗?

Tapping the pulsating blue circle representing the userLocation brings up a "Current Location" callout. Is there a way to suppress that?

推荐答案

一旦用户位置更新,注释视图上就会有一个属性可以更改:

There's a property on the annotation view you can change, once the user location has been updated:

- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
{
    MKAnnotationView *userLocationView = [mapView viewForAnnotation:userLocation];   
    userLocationView.canShowCallout = NO;
}    

这篇关于如何抑制“当前位置"?地图视图中的标注的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆