Custom MKPinAnnotation callout bubble similar to default callout bubble

与世无争的帅哥 提交于 2019-12-02 12:19:44

问题


i want to create a custom callout bubble on MKMapView. But i want to create the call out bubble in the same manner of default bubble. So how to create a View look like annotaion in this image
(source: objectgraph.com)

I want a custom custom view which look like "Parked Location" annotaion in the following image. with custom width, height etc. P

I am not able to add required details in Default bubble. Thats why am creating custom bubble.

Plz help me..thanks..


回答1:


I have developed a custom callout bubble that is nearly identical to the system callout bubble, but gives more flexibility over the height and content. It should be fairly trivial to adjust the appearance to suit your needs. See my post on the Asynchrony Solutions blog for example code and the steps required to implement a good callout replacement.




回答2:


You can check out this tutorial which provides an example on how to subclass the MKAnnotationView in order to provide custom content.




回答3:


You need to use MKCircle and MKCircleView.



来源:https://stackoverflow.com/questions/6345054/can-we-have-multiple-lines-in-subtitle-of-annotation-in-mapkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!