Custom MKPinAnnotation callout bubble similar to default callout bubble
Asked Answered
J

2

15

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 alt text
(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. That's why am creating custom bubble.

Jansen answered 29/3, 2010 at 10:41 Comment(2)
I am answering to my question. https://mcmap.net/q/282798/-uiview-callout-bubble/… But even this is not the right answer..am still searching for that..Will post if am gettingJansen
There's a sample demo project to customize callout bubble github.com/akshay1188/CustomAnnotationGreenhead
S
21

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.

Sita answered 3/9, 2010 at 13:56 Comment(4)
the bubble and the gloss effect are all done without any png in this solution : just pure paths ! :O great ! (and as a consequence , this works also great for retina !)Indoeuropean
Very nice solution. Though I spent a lot of time rewriting code to add such bubbles to a custom UIScrollView descendant.Plausible
I leveraged the code from @Sita link at Asynchrony Solutions blog in my solution for this question: #6393431 Some added functionality includes auto-resizing the callout to fit a view loaded from a separate nib. A sample project is linked.Vulcanism
-1 This solution is terrible. The custom callout will only work with on pin and it is difficult to add mulliline text, despite the tons and tons of code that this thing uses.Dabbs
P
0

You need to use MKCircle and MKCircleView.

Parboil answered 7/3, 2011 at 21:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.