mapkit show annotation by default

I have an annotation showing in mapkit with a custom image, showing fine,

but the annotation shows after taping the pin,

  • CocoaPods use_frameworks! prevents XCode from linking libraries
  • I want two buttons to have equal width and position themselves proportionally in all screens sizes from the top of the scree using autolayout?
  • Position of rightView UITextField
  • How to have Billiards like physics in SpriteKit?
  • How to add different text to UIActivityViewController objects
  • Cancelling single occurence of repeating local notification
  • how can I have the annotation showing by default?, when I start the view? whit out tapping the pin.

    - (MKAnnotationView *)mapView:(MKMapView *)mv viewForAnnotation:(id <MKAnnotation>)annotation
        if([annotation isKindOfClass:[MKUserLocation class]])
            return nil; 
        NSString *annotationIdentifier = @"PinViewAnnotation"; 
        MKPinAnnotationView *pinView = (MKPinAnnotationView *) [mapView 
        if (!pinView) 
            pinView = [[[MKPinAnnotationView alloc] 
                        reuseIdentifier:annotationIdentifier] autorelease];
            [pinView setPinColor:MKPinAnnotationColorGreen];
            pinView.animatesDrop = YES; 
            pinView.canShowCallout = YES; 
            UIImageView *houseIconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tijereta.png"]];
            pinView.leftCalloutAccessoryView = houseIconView; 
            [houseIconView release];        
            pinView.annotation = annotation;
        return pinView; 


    Solutions Collect From Internet About “mapkit show annotation by default”

    you can use this

    [mapView selectAnnotation:pinView animated:YES]; //here pinView is your annotation and mapview is your map

    hope that helped