Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove iOS 6 warnings

  • Loading branch information...
commit f3b80667490f951cbe748e06d3ca9347cf6ef1ce 1 parent 8d81aae
@lickel lickel authored
Showing with 16 additions and 2 deletions.
  1. +16 −2 MTStatusBarOverlay.m
View
18 MTStatusBarOverlay.m
@@ -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_];
@@ -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_];
@@ -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_];
Please sign in to comment.
Something went wrong with that request. Please try again.