3
UIView를 cocos2d와 함께 사용하려고하면 문제가 발생합니다. 나는있는 UIViewController를 생성, 그것을보기를 추가하고 창보기를 추가 :Cocos2d 대 UIKit
-(void)back:(id)sender {
FadeTransition *tran=[FadeTransition transitionWithDuration:0.5f scene:[MainMenuScene node]];
[helpController.view removeFromSuperview];
[[Director sharedDirector] replaceScene:tran];
}
처음 : http://tinyurl.com/nu98ub
이 창에서보기를 제거하고 다른 코코스 장면을 실행 기능이helpController=[[HelpController alloc] init];
helpController.view=view;
[[[[Director sharedDirector] openGLView] window] addSubview: helpController.view];
@interface HelpController : UIViewController
{
}
@end
@implementation HelpController
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return YES;
}
@end
입니다
화면 방향은 UIInterfaceOrientationLandscapeRight입니다. 처음이 뷰를 사용하여 장면을 실행하면이 뷰 방향은 가로 방향이지만 다음에 세로 방향 인 경우이 문제를 해결할 수 없습니다. 누군가가 나를,
다음 번에 다음 번호 : http://tinyurl.com/myk3yw –