Results 1 to 2 of 2

Thread: How to animate SKAnnotationView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Neuer skobbler
    Join Date
    26.11.2015
    Posts
    1

    How to animate SKAnnotationView

    Hi, I would just like to know if there is a way to animate an annotation marker? So far I have used the following code with no luck:

    Code:
        UIView *testView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 64.0, 64.0)];
        UIImageView *coloredView = [[UIImageView alloc] initWithFrame:testView.bounds];
    coloredView.animationImages = [NSArray arrayWithObjects:[UIImage imageNamed:@"pulse_holo_blue-2-0-0-1"],[UIImage imageNamed:@"pulse_holo_blue-2-0-0-2"], nil];
        coloredView.animationDuration = 1.0f;
        [coloredView setAnimationRepeatCount:0];
        [coloredView startAnimating];
        [testView addSubview:coloredView];
            
        SKAnnotationView *view = [[SKAnnotationView alloc] initWithView:testView reuseIdentifier:@"viewID"];
    
        SKAnnotation *viewAnnotation = [SKAnnotation annotation];
        viewAnnotation.annotationView = view;
        viewAnnotation.identifier = 100;
        viewAnnotation.location = CLLocationCoordinate2DMake(14.86, 120.20);
        [self.mapView addAnnotation:viewAnnotation withAnimationSettings:animationSettings];

  2. #2
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Please describe a little more the scenario: how should the animated annotation look like?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •