Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8478295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:42:23+00:00 2026-06-10T18:42:23+00:00

I want to animate the circle that I’m adding as an MKOverLay. I want

  • 0

I want to animate the circle that I’m adding as an MKOverLay. I want it to drop from the top of the screen. How do I animate through the delegate method? Or is it in the addition of the overlay? Can anyone point me in the right direction? Thanks!

I have this in the mapView Delegate Method

-(MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id<MKOverlay>)overlay
{

    if([overlay isKindOfClass:[MKCircle class]]) {
        // Create the view for the radius overlay.
        MKCircleView *circleView = [[MKCircleView alloc] initWithOverlay:overlay];
        circleView.strokeColor = [UIColor whiteColor];
        circleView.fillColor = [[UIColor blueColor] colorWithAlphaComponent:0.2];

        return circleView;
    }

    return nil;
}

And I add overLays like so:

        MKCircle *circle = [MKCircle circleWithCenterCoordinate:userCoord radius:200];
        [mainMapView addOverlay:circle];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:42:24+00:00Added an answer on June 10, 2026 at 6:42 pm

    Let’s say you want to have a scale up + fade in animation, you might do this:

    @interface MyMapOverlayView : UIView<CAAction>
    @end
    
    @implementation MyMapOverlayView
    
    - (id<CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)event
    {
        if ( [ event isEqualToString:@"onOrderIn" ] )
        {
            return self ;
        }
    
        return [ super actionForLayer:layer forKey:event ] ;
    }
    
    - (void)runActionForKey:(NSString *)event object:(id)anObject arguments:(NSDictionary *)dict
    {
        if ( [ event isEqualToString:@"onOrderIn" ] )
        {
            {
                CABasicAnimation * anim = [ CABasicAnimation animationWithKeyPath:@"transform" ] ;
                anim.fromValue = [ NSValue valueWithCATransform3D:CATransform3DMakeScale( 0.1f, 0.1f, 1.0f ) ] ;
                [ self.layer addAnimation:anim forKey:nil ] ;
            }
    
            {
                CABasicAnimation * anim = [ CABasicAnimation animationWithKeyPath:@"opacity" ] ;
                anim.fromValue = @0.0f ;
                [ self.layer addAnimation:anim forKey:nil ] ;
            }
        }
    }
    
    @end
    

    n.b.: I took a guess at how you might add these animations at the time your overlay is added to the map view, but I haven’t tested it. You will need to experiment. You might be able to just set them when the view is created.

    update: I tested it, it seems to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to animate UIBarButtonItem in he NavigationBar from left to right when i
I am new to Silverlight and want to animate a ball that is shot
I have a few divs that I want to animate using jQuery. However, I
I want to animate imageviews using the scale animation the problem is that after
I have a slice/segment of a circle and want to animate it morphing into
I want to animate a view on top of another view in my iphone
i want to animate a string of text taken from an html element using
I want animate this: $(#movethis).position({ my: center top, at: center bottom, of: #nav1 });
I have an image that looks like a donut and want to animate it
I have a little block that I want to animate. But I want it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.