Animate progress bar in XCode for iOS


UIProgressView has a method to set it's progress with animation. Just call that when you create your view:

UIProgressView *view = [[UIProgressView alloc] initWithProgressViewStyle:someStyle];
[view setProgress:0.7 animated:YES];
Author by


Updated on November 22, 2022


  • Bob
    Bob 12 months

    Possible Duplicate:
    How to initiate UIProgressView to a certain value?

    I would like to create a simple progress bar animation in XCode. So, when I open page it should animate to the specific percentage. I am not that familiar with XCode, that's why I ask here. I tried to google that, but no specific solution. Is there any advice on this? I also have looked at some advises here at SO, but no luck.

    Thanks for any help in advance.

  • Bob
    Bob about 11 years
    thanks a lot!! that is what I needed
  • Michael
    Michael about 11 years
    Make sure you're on the main thread when you perform the setProgress:animated: calls or it won't update.