mirror of https://github.com/axmolengine/axmol.git
fix compilation error in xcodebuild command line, which are caused by ios6 deprecated marcos and enums
This commit is contained in:
parent
70e16a5835
commit
c9772c76ec
|
@ -118,18 +118,17 @@
|
|||
}
|
||||
size.width = MIN(size.width, origSize.width);
|
||||
// adjust the point for alignment
|
||||
switch ((NSTextAlignment)self.textAlignment) {
|
||||
case NSTextAlignmentLeft:
|
||||
switch (self.textAlignment) {
|
||||
case UITextAlignmentLeft:
|
||||
break;
|
||||
case NSTextAlignmentCenter:
|
||||
case UITextAlignmentCenter:
|
||||
point.x += (origSize.width - size.width) / 2.0f;
|
||||
break;
|
||||
case NSTextAlignmentRight:
|
||||
case UITextAlignmentRight:
|
||||
point.x += origSize.width - size.width;
|
||||
break;
|
||||
case NSTextAlignmentJustified:
|
||||
case NSTextAlignmentNatural:
|
||||
default: break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
[self.text drawAtPoint:point forWidth:size.width withZFont:actualFont lineBreakMode:self.lineBreakMode];
|
||||
} else {
|
||||
|
|
|
@ -637,19 +637,18 @@ static CGSize drawOrSizeTextConstrainedToSize(BOOL performDraw, NSString *string
|
|||
|
||||
// draw
|
||||
if (performDraw) {
|
||||
switch ((NSTextAlignment)alignment) {
|
||||
case NSTextAlignmentLeft:
|
||||
switch (alignment) {
|
||||
case UITextAlignmentLeft:
|
||||
drawPoint.x = 0;
|
||||
break;
|
||||
case NSTextAlignmentCenter:
|
||||
case UITextAlignmentCenter:
|
||||
drawPoint.x = (constrainedSize.width - lineSize.width) / 2.0f;
|
||||
break;
|
||||
case NSTextAlignmentRight:
|
||||
case UITextAlignmentRight:
|
||||
drawPoint.x = constrainedSize.width - lineSize.width;
|
||||
break;
|
||||
case NSTextAlignmentJustified:
|
||||
case NSTextAlignmentNatural:
|
||||
default: break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
NSUInteger stopGlyphIdx = glyphIdx;
|
||||
NSUInteger lastRunIdx = currentRunIdx;
|
||||
|
|
|
@ -57,15 +57,21 @@
|
|||
return UIInterfaceOrientationIsLandscape( interfaceOrientation );
|
||||
}
|
||||
|
||||
// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
|
||||
- (NSUInteger) supportedInterfaceOrientations{
|
||||
// For ios6.0 and higher, use supportedInterfaceOrientations & shouldAutorotate instead
|
||||
- (NSUInteger) supportedInterfaceOrientations
|
||||
{
|
||||
#ifdef __IPHONE_6_0
|
||||
return UIInterfaceOrientationMaskLandscape;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (BOOL) shouldAutorotate {
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
// Releases the view if it doesn't have a superview.
|
||||
[super didReceiveMemoryWarning];
|
||||
|
|
|
@ -59,7 +59,9 @@
|
|||
|
||||
// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
|
||||
- (NSUInteger) supportedInterfaceOrientations{
|
||||
#ifdef __IPHONE_6_0
|
||||
return UIInterfaceOrientationMaskLandscape;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (BOOL) shouldAutorotate {
|
||||
|
|
|
@ -59,7 +59,9 @@
|
|||
|
||||
// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
|
||||
- (NSUInteger) supportedInterfaceOrientations{
|
||||
#ifdef __IPHONE_6_0
|
||||
return UIInterfaceOrientationMaskLandscape;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (BOOL) shouldAutorotate {
|
||||
|
|
|
@ -42,7 +42,9 @@
|
|||
|
||||
// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
|
||||
- (NSUInteger) supportedInterfaceOrientations{
|
||||
#ifdef __IPHONE_6_0
|
||||
return UIInterfaceOrientationMaskLandscape;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (BOOL) shouldAutorotate {
|
||||
|
|
|
@ -42,7 +42,9 @@
|
|||
|
||||
// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
|
||||
- (NSUInteger) supportedInterfaceOrientations{
|
||||
#ifdef __IPHONE_6_0
|
||||
return UIInterfaceOrientationMaskLandscape;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (BOOL) shouldAutorotate {
|
||||
|
|
|
@ -59,7 +59,9 @@
|
|||
|
||||
// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
|
||||
- (NSUInteger) supportedInterfaceOrientations{
|
||||
#ifdef __IPHONE_6_0
|
||||
return UIInterfaceOrientationMaskLandscape;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (BOOL) shouldAutorotate {
|
||||
|
|
Loading…
Reference in New Issue