Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove iOS 6 warnings #73

Merged
merged 1 commit into from

2 participants

@lickel

Uses #ifdefs to control iOS 5 vs iOS 6 SDKs.

@myell0w myell0w merged commit 0fb1e34 into from
@myell0w
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 12, 2013
  1. @lickel

    Remove iOS 6 warnings

    lickel authored
This page is out of date. Refresh to see the latest.
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_];
Something went wrong with that request. Please try again.