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 6794749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:15:35+00:00 2026-05-26T18:15:35+00:00

-updated code- -(void)animateDot { dotMotion.center = (*doodlePoints)[0]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.5]; [UIView setAnimationRepeatCount:100];

  • 0

-updated code-

-(void)animateDot {
    dotMotion.center = (*doodlePoints)[0];
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationRepeatCount:100];
    for(int i = 1; i < doodlePoints->size(); i++){
        dotMotion.center = (*doodlePoints)[i];
    }

    [UIView commitAnimations];
}

I have a vector of points and I want this to do the animation from point to point. I am only getting from the 2nd to the last to the last working. not anything before.
Any ideas?

So i tried doing this differently. Nothing.
My application has to work 3.x so i can’t use animation blocks.

  • 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-26T18:15:36+00:00Added an answer on May 26, 2026 at 6:15 pm

    Even better try the following:

    -(void) nextAnimation
    {
        CGPoint point = [[self.animatePoints objectAtIndex:0] CGPointValue];
        [self.animatePoints removeObjectAtIndex:0];
        [UIView beginAnimations:nil context:nil];
        [UIView setAnimationDuration:0.5];
        [UIView setAnimationRepeatCount:100];
        dotMotion.center = point;
        [UIView commitAnimations];
    }
    
    - (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
    {
        if ([self.animatePoints count] > 0) {
            [self nextAnimation];
        }
    }
    
    -(void)animateDot {
        self.animatePoints = [NSMutableArray array];
        [UIView setAnimationDelegate:self];
        [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
        for(int i = 1; i < doodlePoints->size(); i++){
            [self.animatePoints addObject:[NSValue valueWithCGPoint:(*doodlePoints)[i]]];
        }
        [self nextAnimation];
    }
    

    This is a rough example of loading the individual points in an NSMutableArray property that is incrementally processed and emptied as each animation completes. You could just as easily use an internal index property to the doodlePoints array but I did it this way should you ever need to pass in a different collection of points. In my example we set the animation delegate and callback selector so we can be told about each animation completing. We then schedule the an animation to the next point and remove it from the array.

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

Sidebar

Related Questions

the following code (from a database object created for each new view): -(void)update:(NSString *)queryText{
Okay I have updated my code quite a bit. I am getting a new
Okay I have updated my code a little, but I am still not exactly
I've updated some code to use the Ajax Control toolkit 0911 beta and for
Update: This turned into a blog post, with updated links and code, over at
I recently updated to the new version of XCode and the session start code
Here's some code I saw once. Can you see what's wrong with it? [updated]
I'm developing an iPhone application that show the camera's view with this code: -(void)
private static void deleteProxy(File proxyOld, String host, int port) { try { String lines,
I have this code in my table view controller (and delegate): - (void)tableView:(UITableView *)tableView

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.