title: Ios 4 - Mkmap placing custom annotations problem
body: <p>I am working on  MKMap View which shows current location based on location coordinate and other custom annotations . It showing correctly on the Iphone 3gs but on iphone 4.0 or above it does not show the custom annotations every time (randomly it showing only green pin not the other ) . what can be the problem ? is there a problem in ios 4.0 and above ? if so how can we solve it .can  anyone  help me </p>
  
  <p>Thanks</p>
  
  <p>Code from viewForAnnotation method...</p>
  
  <pre><code>if ([annotation isMemberOfClass:[MKUserLocation class]]) 
  { 
      return nil; 
  } 
  
  if (annotation==self.normalAnnotation) 
  { 
      NSLog(@"green pin"); 
      MKPinAnnotationView *annotationView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"NormalAnnotation"] autorelease]; 
      annotationView.canShowCallout = NO; 
      annotationView.pinColor = MKPinAnnotationColorGreen; 
      return annotationView; 
  } 
  else 
  { 
      NSLog(@"Custom pin"); 
      Marker *obj = [database getMarkerWithName:[annotation title]]; 
      MKAnnotationView *newAnnotation=[[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"annotation1"]autorelease]; 
      newAnnotation.image = [UIImage imageNamed:obj.markerImage]; 
      newAnnotation.canShowCallout=YES; 
      UIButton *button = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; 
      [button addTarget:self action:@selector(checkButtonTapped:) forControlEvents:UIControlEventTouchUpInside]; 
      [button setTag:obj.markerID]; 
      newAnnotation.rightCalloutAccessoryView=button; 
      //annotation.annotationObj = newAnnotation; 
      return newAnnotation; 
  }
  </code></pre>