Permalink
Browse files

Merge pull request #73 from Threadflip/iOS-6

Remove iOS 6 warnings
  • Loading branch information...
2 parents 8d81aae + f3b8066 commit 0fb1e345a5e153ecd0c597f437b302e97379099d @myell0w committed Jul 14, 2013
Showing with 16 additions and 2 deletions.
  1. +16 −2 MTStatusBarOverlay.m
View
@@ -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_];

0 comments on commit 0fb1e34

Please sign in to comment.