Using MKAnnotationView without MKMapView?
Asked Answered
K

3

6

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.

Knesset answered 24/10, 2009 at 21:49 Comment(2)
why would you want to do that?Speech
Because it would be nice to be able to get the functionality of the UICalloutView without using an undocumented API that the App Store would reject. I've solved this by constructing a similar control by hand, but using an existing class would have saved quite a bit of time.Knesset
K
4

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

http://github.com/edanuff/MonoTouchCalloutView

Knesset answered 28/12, 2009 at 21:23 Comment(0)
F
11

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.

Florencio answered 18/1, 2010 at 21:10 Comment(1)
thanks for the code. But I've found images missing in the example sources. I put some sample images to see how it works. It seems it doesn't have an anchor arrow that points to the place you tapJinnah
K
4

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

http://github.com/edanuff/MonoTouchCalloutView

Knesset answered 28/12, 2009 at 21:23 Comment(0)
D
3

Check out the open-source SMCalloutView, which is a near-exact replica of UICalloutView:

https://github.com/nfarina/calloutview

Digamma answered 2/9, 2012 at 17:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.