【发布时间】:2012-05-07 17:37:34
【问题描述】:
我正在通过以下方式加载UIViewController:
-(void)logIn
{
NewSignInView *viewController = [[[NewSignInView alloc] init] autorelease];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
[self presentModalViewController:navController animated:YES];
[navController release];
[UIView animateWithDuration:0.3
delay:0
options:UIViewAnimationCurveEaseOut
animations:^{ self.view.alpha = 0; }
completion:^(BOOL finished){ }];
}
NewSignView 是一个UIViewController,它创建一个UITableView 来获取用户的输入。当我使用UINavigationController 加载它时,它拒绝以横向模式打开。但是,如果我按照以下方式将其直接加载到CCDirector,它将在横向中正确打开。
[[[CCDirector sharedDirector] openGLView] addSubview:viewController.view];
我在NewSignInView中使用以下内容:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
所以有些东西阻止了UINavigationController 在横向模式下打开。任何人都可以以任何方式帮助我找出导致问题的原因吗?
谢谢
【问题讨论】:
标签: iphone ios uiview uinavigationcontroller cocos2d-iphone