views:

89

answers:

1

Hello i have implemented the following code:

- (void) mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)annView calloutAccessoryControlTapped:(UIControl *)control {
name = annView.annotation.title;

NSLog(name, [annView description]);

}

and how can I use the variable name in another class? can you please help me, i am new in iphone developing!

A: 

ok but now is the problem, to manage the switch between this two classes i have implemented a rootViewcontroller that includes the switch.

- (IBAction) goToViewList {
    [rootViewController switchViews];
}

this is the method in the mapView, but how can i change the view in this method:

- (void) mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)annView calloutAccessoryControlTapped:(UIControl *)control {
    NSString *name = annView.annotation.title;
    NSLog(name, [annView description]);
}
Marco