需求是,向js提供接口可以程序控制屏幕方向,调整为横屏 或者 竖屏。
jsb反射调用了OC代码,将window进行了翻转
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationPortrait;
[UIApplication sharedApplication].keyWindow.transform=CGAffineTransformMakeRotation(M_PI_2*3);
CGRect bounds = [UIScreen mainScreen].bounds;
[UIApplication sharedApplication].keyWindow.frame = CGRectMake(bounds.origin.x, bounds.origin.y, bounds.size.height, bounds.size.width);
GLVIEW也跟随进行了翻转
想调整GLView的位置和尺寸,经过几次尝试都失败了。
想仿照cocos2dx2.0 的方案,通过替换不同的RootViewController来实现,在设置 RootViewControllerV.view = nil 时崩溃了。
求解决方案。或者调整glview 位置尺寸的方案
