Hi all,

I have a MapView with a great deal of MKAnnotation's object. Actually is a
custom one. I have a MapViewDelegate for overriding GetViewForAnnotation
Method and everything is going OK so far.

Inside GetViewForAnnotation method I'm using RightCalloutAccessoryView
property for adding a button. I want this button, actually detail button, to
navigate to another View in order to show me an image, however I don't know
how to do it, since that's my first project w/ Monotouch.

What I'm aim to do is:

public override MKAnnotationView GetViewForAnnotation 
                    (MKMapView mapView, NSObject annotation)
                {
                        var anv = mapView.DequeueReusableAnnotation 
("thislocation");
                        if (anv == null) {
                                anv = new MKPinAnnotationView (annotation, 
"thislocation");
                        } else {
                                anv.Annotation = annotation;
                        }
                        
                        anv.CanShowCallout = true;
                        
                        UIButton detailButton = 
UIButton.FromType(UIButtonType.DetailDisclosure);
                        detailButton.TouchUpInside += /* HERE TO NAVIGATE TO 
ANOTHER VIEW */ 
                        
                        anv.RightCalloutAccessoryView = detailButton;
                        return anv;
                }

Any idea? Thanks in advance!!

best regards,

--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Understanding-the-Delegates-tp4376197p4376197.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to