I have the following code
else if([annotation.title isEqualToString:NSLocalizedString(@"TITLE 1",nil)]|| [annotation.title isEqualToString:NSLocalizedString(@"TITLE 2",nil)])
{
static NSString *identifier = @"currentLocation";
SVPulsingAnnotationView *pulsingView = (SVPulsingAnnotationView *)[self.mapView dequeueReusableAnnotationViewWithIdentifier:identifier];
if(pulsingView == nil) {
pulsingView = [[SVPulsingAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:identifier];
pulsingView.annotationColor = [UIColor colorWithRed:0 green:0.678431 blue:0 alpha:1];
pulsingView.image = [UIImage imageNamed:@"image.png"];
pulsingView.frame = CGRectMake(0, 0, 15, 15);
pulsingView.canShowCallout = YES;
}
return pulsingView;
Basically it's an image and besides it we have a pulsing round annotation. When the image is tapped - the annotation description with either "Title 1" or "Title 2" comes up depending on the conditions (which are not relevant here).
The issue is simple - when i apply
pulsingView.frame = CGRectMake(0, 0, 15, 15);
The image on top of the pulsing view doesn't change size.
Need help with alternative solutions.
Thank you so much guys!
1) Try this
instead of
2) If the first solution doesn't work maybe you need to disable the autolayout if you are using Storyboard or...
3) if you use XIB maybe you need to add