From 99828498500f5127e507d0d3d56806702e9ab1f9 Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Fri, 6 May 2016 13:16:51 +0800 Subject: [PATCH] fixed binary template --- .../proj.ios_mac/ios/RootViewController.mm | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/native/templates/js-template-binary/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm b/native/templates/js-template-binary/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm index 79661d5739..38f058e621 100755 --- a/native/templates/js-template-binary/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm +++ b/native/templates/js-template-binary/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm @@ -26,7 +26,6 @@ #import "RootViewController.h" #import "cocos2d.h" #import "platform/ios/CCEAGLView-ios.h" -#include "ide-support/SimpleConfigParser.h" @implementation RootViewController @@ -56,43 +55,28 @@ // Override to allow orientations other than the default portrait orientation. // This method is deprecated on ios6 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - - if (SimpleConfigParser::getInstance()->isLanscape()) { - return UIInterfaceOrientationIsLandscape( interfaceOrientation ); - }else{ - return UIInterfaceOrientationIsPortrait( interfaceOrientation ); - } - + return UIInterfaceOrientationIsLandscape( interfaceOrientation ); } // For ios6, use supportedInterfaceOrientations & shouldAutorotate instead - (NSUInteger) supportedInterfaceOrientations{ #ifdef __IPHONE_6_0 - if (SimpleConfigParser::getInstance()->isLanscape()) { - return UIInterfaceOrientationMaskLandscape; - }else{ - return UIInterfaceOrientationMaskPortrait; - } + return UIInterfaceOrientationMaskAllButUpsideDown; #endif } - (BOOL) shouldAutorotate { - if (SimpleConfigParser::getInstance()->isLanscape()) { - return YES; - }else{ - return NO; - } + return YES; } - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); - if (glview) { - CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView(); - + CCEAGLView *eaglview = (CCEAGLView*)glview->getEAGLView(); + if (eaglview) { CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]);