views:

1056

answers:

4

I'm wondering if it's possible to use the MKAnnotationView inside a UIView other than MKMapView? I'm trying to find an alternative to using the undocumented UICalloutView class. I can create the MKAnnotationView and add it to my view, but I can't get it to show.

A: 

Hey Ed I am facing same issue that i need to use UICalloutView but since it is not documented i cant take risk to use it. Can you please elaborate/share the control that you created. That would be a great help.

Thanks.

Mudit
Yes, I plan to do that. The app I'm working on is created using MonoTouch, which is the C# compiler for the iPhone, so the code is in C# rather than Objective C, but it's pretty easy for me to convert it back to Obj-C, I just haven't had time yet.I can tell you that programatically, it's just a UIView that contains 2 UIImageViews to constuct the shape of the callout, a UILabel for the callout text, and a DetailDisclosure button. In addition a CGAffineTransformMakeScale animation is used when it's shown to recreate the pulse effect the UICalloutView has when it's shown.
Ed Anuff
A: 

Ed, would be great if you would share the code. I am also having a case where I need to use something like MKAnnotationView outside MKMapView. If you are short on time, I could port it to Objective C.

holtmann
Yes, you can find it here:http://github.com/edanuff/MonoTouchCalloutView
Ed Anuff
+2  A: 

This is a work-alike CalloutView implemented in MonoTouch, if someone creates an Obj-C version, let me know.

http://github.com/edanuff/MonoTouchCalloutView

Ed Anuff
+6  A: 

To anyone interested:

I ported the code of Ed Anuff to Objective C. The source is complete with an Example. You can download it here.

Maybe Ed can check it (I hope I did not do too many mistakes) and add it to his git repository.

holtmann