开发者

Change Custom annotation Label without removing it from Map in iPhone

I am diplaying a Custom annotation in the center of the map. Which continues need to update its label how far is it from the center of the map.

P.S. Center of the map means the centre of the visible region in the map.

So by default my annotation is in the center of the map with label 0 then when I 开发者_Python百科move the map it must update itself.

Currently on each move I am removing the annotation and adding the annotation with updated text. But its not the correct way..

Kindly help.... Thanks in advance....


I'd add a UIView with the label on it on the view that contains map right after adding map view. The size of this new view should be the same to size of the map. The tricky part is handling touches on it and then transferring them to the map view. You can dig into this tutorial. It is not map view but web view, nevertheless principles are the same.

If you choose that way you don't have to add this label as an annotation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜