Skip to content

Commit

Permalink
Reset size of labels after overlay was shrinked, fixes #36
Browse files Browse the repository at this point in the history
  • Loading branch information
myell0w committed Oct 19, 2011
1 parent fd5f31c commit 3b86c74
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion MTStatusBarOverlay.m
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ - (id)initWithFrame:(CGRect)frame {
// the hidden status label at the beginning
hiddenStatusLabel_ = statusLabel2_;


progress_ = 1.0;
progressView_ = [[UIImageView alloc] initWithFrame:statusBarBackgroundImageView_.frame];
progressView_.opaque = NO;
Expand Down Expand Up @@ -918,6 +917,14 @@ - (void)setShrinked:(BOOL)shrinked animated:(BOOL)animated {

self.statusLabel1.hidden = NO;
self.statusLabel2.hidden = NO;

CGRect frame = self.statusLabel1.frame;
frame.size.width = self.backgroundView.frame.size.width-60.f;
self.statusLabel1.frame = frame;

frame = self.statusLabel2.frame;
frame.size.width = self.backgroundView.frame.size.width-60.f;
self.statusLabel2.frame = frame;
}

// update status bar background
Expand Down

0 comments on commit 3b86c74

Please sign in to comment.