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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:06:12+00:00 2026-05-31T12:06:12+00:00

I want to animate increment of numbers starting from 1 to a limit (variable)

  • 0

I want to animate increment of numbers starting from 1 to a limit (variable) , the duration of animation is 1.5 seconds. each time when I call the method this animation should work ( animate increment from 0 to (eg: 70 ).
int j=1;

[UIView beginAnimations:nil context:nil]; 
[UIView setAnimationDuration: 1.5]; 
[UIView setAnimationDelegate: self];

do{
self.label.text=[NSString stringWithFormat:@"%ï", j];
}

while(j<=limit);

 [UIView commitAnimations];

Please help to animate the incrementing of the numbers…..

  • 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-31T12:06:14+00:00Added an answer on May 31, 2026 at 12:06 pm

    You can’t do something like this. You can only animate the animatable properties of a view. These are: frame, bounds, center, transform, alpha, backgroundColor and contentStretch.

    You want to use a NSTimer that updates the label every 1.5 seconds.

    Probably something along those lines:

    - (void)startAnimationWithLimit:(NSInteger)limit {
        self.limit = limit;
        self.timerFireCount = 0;
        [self.timer invalidate];        // stop timer if one is running already
        self.timer = [NSTimer scheduledTimerWithTimeInterval:1.5f target:self selector:@selector(timerFired:) userInfo:nil repeats:YES];
    }
    
    - (void)timerFired:(NSTimer *)timer {
        self.timerFireCount++;
        self.label.text = [NSString stringWithFormat:@"%i", self.timerFireCount];
        if (self.timerFireCount > self.limit) {
            [timer invalidate];
            self.timer = nil;
            self.label.text = @"Press start";
        }
    }
    

    and then start the timer with [self startAnimationWithLimit:70];

    • 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 want to animate my two window using NSWindowFlipper i get the code from
I want to animate a glowing light. In animation ie when I press the
I want to animate a button such that it moves from android:gravity=centre to android:gravity=top
I want to Animate two Different layouts. Example I already have the animation the
I want to animate imageviews using the scale animation the problem is that after
I want to animate a series of items in jquery 1.3, with each next
I want to animate an absolute-positioned image with right:xxxPX, let's say. Wen the animation
I want to animate two jquery OBJECTS at the same time (using the jquery
I want to animate a div from top down. I think the idea is

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.