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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:09:38+00:00 2026-06-06T12:09:38+00:00

I have started playing with UIProgressView in iOS5, but havent really had luck with

  • 0

I have started playing with UIProgressView in iOS5, but havent really had luck with it. I am having trouble updating view. I have set of sequential actions, after each i update progress. Problem is, progress view is not updated little by little but only after all have finished. It goes something like this:

float cnt = 0.2;
for (Photo *photo in [Photo photos]) {
    [photos addObject:[photo createJSON]];
    [progressBar setProgress:cnt animated:YES];
    cnt += 0.2;
}

Browsing stack overflow, i have found posts like these – setProgress is no longer updating UIProgressView since iOS 5, implying in order for this to work, i need to run a separate thread.

I would like to clarify this, do i really need separate thread for UIProgressView to work properly?

  • 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-06T12:09:39+00:00Added an answer on June 6, 2026 at 12:09 pm

    Yes the entire purpose of progress view is for threading.

    If you’re running that loop on the main thread you’re blocking the UI. If you block the UI then users can interact and the UI can’t update. YOu should do all heavy lifting on the background thread and update the UI on the main Thread.

    Heres a little sample

    - (void)viewDidLoad
    {
        [super viewDidLoad];
    
        [self performSelectorInBackground:@selector(backgroundProcess) withObject:nil];
    
    }
    
    - (void)backgroundProcess
    {    
        for (int i = 0; i < 500; i++) {
            // Do Work...
    
            // Update UI
            [self performSelectorOnMainThread:@selector(setLoaderProgress:) withObject:[NSNumber numberWithFloat:i/500.0] waitUntilDone:NO];
        }
    }
    
    - (void)setLoaderProgress:(NSNumber *)number
    {
        [progressView setProgress:number.floatValue animated:YES];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started playing around with Berkeley DB. This one is really interesting, but
i have just started playing aorund with asp.net mvc and i want to view
I have started playing around with db4o but quite soon I have run into
I have just started playing with Java, and I really like the language. I
I have started playing around with Apache camel recently. So being the experimental type
I started playing with Haskell and I use Vim. I have autoindent on in
I've started playing around with transitions and have come up against quite a big
I have a basic GWT Maven project going. I added SmartGWT and started playing
I have started implementing Subscriptions into my app but I cannot get the API
I have started playing with Maven2 and I'm attempting to port one of my

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.