views:

86

answers:

0

Hello Everybody,

        I have dropped multiple pins in my mapview when each pin is clicked it should display its corresponding name. when the pin is tabbed no need to go to another page just need a pop up.

 - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation
  {
    MKPinAnnotationView *annView=[[MKPinAnnotationView alloc]  initWithAnnotation:annotation reuseIdentifier:@"currentloc"]; 

     annView=nil;
    [annView setPinColor:MKPinAnnotationColorPurple];
    annView.canShowCallout = YES;
    UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
    infoButton.titleLabel.text=@"Checking value";
    annView.rightCalloutAccessoryView = infoButton;
    return annView;
  }

kindly some one can help me..