0
먼저 - 비슷한 주제를 모두 읽었고 그 중 일부는 나를 위해 작동하지 않습니다. 뷰 컨트롤러가 거의 없습니다. 그리고 그 코드를 변경 : iPhone force orientation
- (void)flipToAzbukaMenu {
AzbukaMenuController *aAzbukaMenu = [[AzbukaMenuController alloc] initWithNibName:@"AzbukaMenu" bundle:nil];
[self setAzbukaMenuController:aAzbukaMenu];
[aAzbukaMenu release];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:2.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:window cache:NO];
[viewController.view removeFromSuperview];
[azbukaArcadeController.view removeFromSuperview];
[self.window addSubview:[azbukaMenuController view]];
[UIView commitAnimations];
}
이 또한 내가 나 가로 모드에서 응용 프로그램을 시작할 수 있습니다 PLIST에 적절한 키가 있습니다. 앱이 시작되면 앱이 올바른 방향 (가로)을 가졌지 만 내보기를 변경하면 세로가되고 270도 회전하지 않고 다시 가로로 바뀝니다 (90LOL 아님). 앱이 모든보기를 가로 모드로 표시하도록하려면 어떻게해야합니까?
UPD :
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if ((interfaceOrientation==UIInterfaceOrientationPortrait)||(interfaceOrientation==UIInterfaceOrientationPortraitUpsideDown))
{
return NO;
}
if ((interfaceOrientation==UIInterfaceOrientationLandscapeLeft)||(interfaceOrientation==UIInterfaceOrientationLandscapeRight))
{
return YES;
} else {
return YES;
}
}
수정 - UPD의 코드에서만 작동합니다. – Andoriyu