如何在地图注释上自动显示标题/副标题(图钉) [英] How to Automatically Display Title/Subtitle on Map Annotation (pin)

查看:36
本文介绍了如何在地图注释上自动显示标题/副标题(图钉)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将注释加载到我的地图视图中.加载地图时,注释显示为图钉.

I am loading an annotation onto my map view. The annotation displays as a pin when the map is loaded.

但是,标题和副标题不会自动出现在图钉上.目前,用户需要在标题显示之前点击图钉.

However, the title and subtitle do not appear on the pin automatically. Currently, the user is required to tap on the pin before the title displays.

有没有办法在加载地图时让标题自动显示在图钉上?

Is there a way to get the title to display automatically on the pin when the map is loaded?

(这个问题几乎是一样的,但不完全是:在 iphone 的地图中显示当前位置的标题 因为我已经在我的对象中定义了 -title 和 -subtitle 属性.)

(This question is almost the same thing, but not quite there: To display the title for the current loaction in map in iphone because I already have the -title and -subtitle attributes defined in my object.)

谢谢

推荐答案

调用的方法是来自 MKMapView 的selectAnnotation:animated".

The method to call is "selectAnnotation:animated" from MKMapView.

这篇关于如何在地图注释上自动显示标题/副标题(图钉)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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