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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:56:27+00:00 2026-06-04T00:56:27+00:00

I am making an application in which i have put a progress bar .

  • 0

I am making an application in which i have put a progress bar .

I just need to know about the progress of the bar…

How will i come to know about the progress..

Even i want the print the progress bar in a label time to time..

Here, is my code

[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(onTimer) userInfo:nil repeats:YES];
-(void) onTimer {

    [progressView setProgress:5 animated:YES];


    sliderLabel.text=[NSString stringWithFormat:@"%0.2f",progressView.progress *100];

}

Here ,i have set a timer in viewdidLoad and as and when the progress is raised ,the label

should get updated .

Kindly help.

Thanks,

  • 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-04T00:56:28+00:00Added an answer on June 4, 2026 at 12:56 am

    First thing you are doing wrong. Every time your timer invoke you are setting your progressView’s progress to 5. So it won’t actually progress.

    Now for getting your progressView’s actual progress you can use progress property of UIProgressView.

    [The current progress is represented by a floating-point value between 0.0 and 1.0, inclusive, where 1.0 indicates the completion of the task. The default value is 0.0. Values less than 0.0 and greater than 1.0 are pinned to those limits.]

    see UIProgressView

    UIProgressView have progress between 0.0 to 1.0. 1.0 represent 100% so if you want to set progress somewhere set it between 0.0-1.0.

    Edit:

    Do one thing you know about timer. Create two timer one for setting progressView’s progress. don’t make it fix. Take a global float value first time 0.0. Every time your timer invoke add some thing in that value let say you are adding 0.1 every time. So when your timere invoke 10th time your value will be 1.0. and your progressView will have progress increasing.

    - (void)onTimer {
        myValue += 0.1;
        [progressView setProgress:myValue];
    }
    

    myValue will be a float declared in .h file.

    In your second timer you can print the progress of your progressview as you are doing right now. but don’t set progress again in second view.

    Hope this helps

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

Sidebar

Related Questions

I am making an application which will have an interface similar to Photoshop: multiple
I am making Winforms application. I have put gridview in usercontrol. Which is another
I am making an android application in which I have put 10 images and
I am thinking of making an (initially) small Web Application, which would eventually have
I am making an application which will run automatically on phone start up. Now
I'm making a file transfer application between (client-server) and have the tools I need
hii... I am making a view based application in which I have tabbar controller
I am making a window based application. In this I have put some entries
I am making on application in which user have to select the time, example
I am making an application in which I have to change the position of

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.