Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove iOS 6 warnings #73

Merged
merged 1 commit into from Jul 14, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 16 additions & 2 deletions MTStatusBarOverlay.m
Expand Up @@ -392,7 +392,11 @@ - (id)initWithFrame:(CGRect)frame {
finishedLabel_.backgroundColor = [UIColor clearColor];
finishedLabel_.hidden = YES;
finishedLabel_.text = kFinishedText;
#ifdef __IPHONE_6_0
finishedLabel_.textAlignment = NSTextAlignmentCenter;
#else
finishedLabel_.textAlignment = UITextAlignmentCenter;
#endif
finishedLabel_.font = [UIFont fontWithName:@"HelveticaNeue-Bold" size:kFinishedFontSize];
finishedLabel_.adjustsFontSizeToFitWidth = YES;
[self addSubviewToBackgroundView:finishedLabel_];
Expand All @@ -402,9 +406,14 @@ - (id)initWithFrame:(CGRect)frame {
statusLabel1_.backgroundColor = [UIColor clearColor];
statusLabel1_.shadowOffset = CGSizeMake(0.f, 1.f);
statusLabel1_.font = [UIFont boldSystemFontOfSize:kStatusLabelSize];
statusLabel1_.textAlignment = UITextAlignmentCenter;
statusLabel1_.numberOfLines = 1;
#ifdef __IPHONE_6_0
statusLabel1_.textAlignment = NSTextAlignmentCenter;
statusLabel1_.lineBreakMode = NSLineBreakByTruncatingTail;
#else
statusLabel1_.textAlignment = UITextAlignmentCenter;
statusLabel1_.lineBreakMode = UILineBreakModeTailTruncation;
#endif
statusLabel1_.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self addSubviewToBackgroundView:statusLabel1_];

Expand All @@ -413,9 +422,14 @@ - (id)initWithFrame:(CGRect)frame {
statusLabel2_.shadowOffset = CGSizeMake(0.f, 1.f);
statusLabel2_.backgroundColor = [UIColor clearColor];
statusLabel2_.font = [UIFont boldSystemFontOfSize:kStatusLabelSize];
statusLabel2_.textAlignment = UITextAlignmentCenter;
statusLabel2_.numberOfLines = 1;
#ifdef __IPHONE_6_0
statusLabel2_.textAlignment = NSTextAlignmentCenter;
statusLabel2_.lineBreakMode = NSLineBreakByTruncatingTail;
#else
statusLabel2_.textAlignment = UITextAlignmentCenter;
statusLabel2_.lineBreakMode = UILineBreakModeTailTruncation;
#endif
statusLabel2_.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self addSubviewToBackgroundView:statusLabel2_];

Expand Down