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

  • Home
  • SEARCH
  • 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 3438048
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:08:23+00:00 2026-05-18T08:08:23+00:00

Update: There is no problem here. Turns out I was re-adding the animation every

  • 0

Update:

There is no problem here. Turns out I was re-adding the animation every time I moved the point. Was else where in the code and I just totally glossed over it. Please ignore this question.

end update

I have a UIView which is just acting as a container for a UIImageView and a CAShaperLayer. The shape layer is drawing a circle and I have added a path animation to that shape layer to make it pulse. I want to be able to pulse the circle and move the container view at the same time using the center property of the UIView. However, when I set the center property on the container UIView, the pulse animation restarts from it’s beginning no matter where it is at in it’s animation.

How do I prevent the pulse animation from restarting?

Pulse animation:

CGRect startRect = CGRectMake(-10 + (self.bounds.size.width / 2),
                              -10 + (self.bounds.size.height / 2),
                              20,
                              20);

CGMutablePathRef fromPath = CGPathCreateMutable();
CGPathAddEllipseInRect(fromPath, NULL, startRect);

CGRect endRect = CGRectMake(-20 + (self.bounds.size.width / 2),
                            -20 + (self.bounds.size.height / 2),
                            40,
                            40);

CGMutablePathRef toPath = CGPathCreateMutable();
CGPathAddEllipseInRect(toPath, NULL, endRect);

CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"path"];
animation.fromValue = (id)fromPath;
animation.toValue = (id)toPath;

CGPathRelease(fromPath);
CGPathRelease(toPath);

animation.duration = 2.0f;
animation.repeatCount = HUGE_VALF;

[self.myCircleLayer addAnimation:animation forKey:self.pathAnimationKey];

I move the container view by doing:

self.myContainerView.center = newPoint;
  • 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-05-18T08:08:24+00:00Added an answer on May 18, 2026 at 8:08 am

    See the update above. Turns out there was no problem here.

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

Sidebar

Related Questions

update: I know there is no one best way to do everything. Sorry for
In sql server 2005 , inside an update trigger is there a way to
Is there any way to force an update of software using RunOnce, without having
Is there a way to tell subversion update/merge unless it would cause a conflict?
Is there a way to update more than one Database having same schema using
Is there a way to update information in a div of a parent page
Is there a way to detect when an update panel is done refreshing? I
Is there a way to exclude all svn externals when doing a recursive update?
Update: Now that it's 2016 I'd use PowerShell for this unless there's a really
In a project that I'm working, there's a table with a on update trigger,

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.