I need to set the frame to an to an image which is used as the image of pinAnnotation.
With This is I add the image,
MKAnnotationView* annotationView = [objMapView dequeueReusableAnnotationViewWithIdentifier:annotationIdentifier];
if(!annotationView)
{
annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation
reuseIdentifier:annotationIdentifier];
}
annotationView.image = [UIImage imageNamed:@"rrb.png"] ;
The current view is like this...whereas this image is to be used for each annotationPin. Though this image is big but how do i set the frame so that it just fits according to my frame. These images would be coming through webService.
The view is supposed to be like this... (i changed the size of the image)
to set the image on annotation :
UIImageView *imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:joinString]];
[imgV setFrame:CGRectMake(0, 0, 40, 40)];
annotationView.image = imgV.image;
// join String is the string containing the image fetched from webService.