Renames s_isIOS7 to s_isIOS7OrHigher

This commit is contained in:
James Chen 2014-04-01 15:08:08 +08:00
parent 944e752509
commit 70dd83512c
1 changed files with 3 additions and 3 deletions

View File

@ -199,14 +199,14 @@ typedef struct
} tImageInfo; } tImageInfo;
static bool s_isIOS7 = false; static bool s_isIOS7OrHigher = false;
static inline void lazyCheckIOS7() static inline void lazyCheckIOS7()
{ {
static bool isInited = false; static bool isInited = false;
if (!isInited) if (!isInited)
{ {
s_isIOS7 = [[[UIDevice currentDevice] systemVersion] compare:@"7.0" options:NSNumericSearch] != NSOrderedAscending; s_isIOS7OrHigher = [[[UIDevice currentDevice] systemVersion] compare:@"7.0" options:NSNumericSearch] != NSOrderedAscending;
isInited = true; isInited = true;
} }
} }
@ -394,7 +394,7 @@ static bool _initWithString(const char * text, cocos2d::Device::TextAlign align,
{ {
CGContextSetTextDrawingMode(context, kCGTextStroke); CGContextSetTextDrawingMode(context, kCGTextStroke);
if(s_isIOS7) if(s_isIOS7OrHigher)
{ {
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.alignment = nsAlign; paragraphStyle.alignment = nsAlign;