Reputation: 143134
Is it possible to animate the change of a UIProgressView
such that the display will move smoothly to the new value?
Kinda like NSProgressIndicator does.
Upvotes: 32
Views: 19611
Reputation: 2641
(Swift version)
The UIProgressView method setProgress:animated:
:
self.progressView.setProgress(1, animated: true)
open func setProgress(_ progress: Float, animated: Bool)
animated - TRUE if the change should be animated, FALSE if the change should happen immediately.
Upvotes: 3
Reputation: 34983
The UIProgressView method setProgress:animated:
was added in iOS 5:
[progressView setProgress:1.0 animated:YES];
- (void)setProgress:(float)progress animated:(BOOL)animated
animated - YES if the change should be animated, NO if the change should happen immediately.
Available in iOS 5.0 and later.
Upvotes: 6
Reputation: 25246
If you interested in this please fill a bug report, Duplicate/5883058:
Title: UIProgressView setProgress:(float)value animated:(BOOL)animated
Problem Description:
UIProgressView should
have a setProgress:(float)value animated:(BOOL)animated
function like UISlider
to be able to animate the progress.
Upvotes: 62