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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
S.P.
  • 5,427
  • 11
  • 56
  • 83
  • 1
    There's a sample demo project to customize callout bubble https://github.com/akshay1188/CustomAnnotation – akshay1188 Sep 03 '12 at 17:34
  • I am answering to my question. http://stackoverflow.com/questions/1963063/uiview-callout-bubble/1966624#1966624 But even this is not the right answer..am still searching for that..Will post if am getting – S.P. May 10 '10 at 09:17

2 Answers2

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.

JARinteractive
  • 461
  • 5
  • 8
  • 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 !) – yonel Sep 21 '10 at 08:30
  • Very nice solution. Though I spent a lot of time rewriting code to add such bubbles to a custom UIScrollView descendant. – Kostiantyn Sokolinskyi Apr 06 '11 at 12:07
  • I leveraged the code from @JARinteractive link at Asynchrony Solutions blog in my solution for this question: http://stackoverflow.com/questions/6392931/mkannotationview-lock-custom-annotation-view-to-pin-on-location-updates/7363862#7363862 Some added functionality includes auto-resizing the callout to fit a view loaded from a separate nib. A sample project is linked. – Jacob Jennings Nov 18 '11 at 22:55
  • 2
    -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. – JohnMerlino May 02 '12 at 17:58
0

You need to use MKCircle and MKCircleView.