Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't animate to progress 0

  • Loading branch information...
commit 5a19db33ac592448784ebf44c42396d74572bfe1 1 parent 1b4c491
@myell0w myell0w authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 MTStatusBarOverlay.m
View
9 MTStatusBarOverlay.m
@@ -1257,10 +1257,11 @@ - (void)updateProgressViewSizeForLabel:(UILabel *)label {
// it "shrinks" to the right with increased progress to reveal more
// text under it
self.progressView.hidden = NO;
- [UIView animateWithDuration:kUpdateProgressViewDuration animations:^{
- self.progressView.frame = CGRectMake(x, self.progressView.frame.origin.y,
- self.backgroundView.frame.size.width-x, self.progressView.frame.size.height);
- }];
+ [UIView animateWithDuration:self.progress > 0.0 ? kUpdateProgressViewDuration : 0.0
+ animations:^{
+ self.progressView.frame = CGRectMake(x, self.progressView.frame.origin.y,
+ self.backgroundView.frame.size.width-x, self.progressView.frame.size.height);
+ }];
} else {
self.progressView.hidden = YES;
}
Please sign in to comment.
Something went wrong with that request. Please try again.