Permalink
Browse files

Merge pull request #100 from jparise/textalignment-ios6

Address UITextAlignment deprecation warnings in iOS 6.
  • Loading branch information...
2 parents 07307d5 + 048e323 commit 8621b7c26b6131e8e4739261f6190da30e0e5872 @samvermette samvermette committed Sep 28, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 SVProgressHUD/SVProgressHUD.m
View
6 SVProgressHUD/SVProgressHUD.m
@@ -452,7 +452,11 @@ - (UILabel *)stringLabel {
stringLabel.textColor = [UIColor whiteColor];
stringLabel.backgroundColor = [UIColor clearColor];
stringLabel.adjustsFontSizeToFitWidth = YES;
- stringLabel.textAlignment = UITextAlignmentCenter;
+ #if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000
+ stringLabel.textAlignment = UITextAlignmentCenter;
+ #else
+ stringLabel.textAlignment = NSTextAlignmentCenter;
+ #endif
stringLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters;
stringLabel.font = [UIFont boldSystemFontOfSize:16];
stringLabel.shadowColor = [UIColor blackColor];

0 comments on commit 8621b7c

Please sign in to comment.