Skip to content

Commit

Permalink
Revert to using number constants instead of __IPHONE_X_0 to check for…
Browse files Browse the repository at this point in the history
… iOS versions, since those versions will be undefined when targeting previous releases
  • Loading branch information
mattt committed Mar 11, 2014
1 parent 5cda16c commit 67e632e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TTTAttributedLabel/TTTAttributedLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@


static inline CTTextAlignment CTTextAlignmentFromTTTTextAlignment(TTTTextAlignment alignment) {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_6_0
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
switch (alignment) {
case NSTextAlignmentLeft: return kCTLeftTextAlignment;
case NSTextAlignmentCenter: return kCTCenterTextAlignment;
Expand All @@ -90,7 +90,7 @@ static inline CTTextAlignment CTTextAlignmentFromTTTTextAlignment(TTTTextAlignme
}

static inline CTLineBreakMode CTLineBreakModeFromTTTLineBreakMode(TTTLineBreakMode lineBreakMode) {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_6_0
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
switch (lineBreakMode) {
case NSLineBreakByWordWrapping: return kCTLineBreakByWordWrapping;
case NSLineBreakByCharWrapping: return kCTLineBreakByCharWrapping;
Expand All @@ -105,7 +105,7 @@ static inline CTLineBreakMode CTLineBreakModeFromTTTLineBreakMode(TTTLineBreakMo
#endif
}

#if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_6_0
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000
static inline CTLineBreakMode CTLineBreakModeFromUILineBreakMode(UILineBreakMode lineBreakMode) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
Expand Down

0 comments on commit 67e632e

Please sign in to comment.