범용 앱에서 인터페이스 방향을 변경할 수 없습니다. 그것은 네비게이션 컨트롤러를 가지고 있습니다. 탐색 컨트롤러에보기 컨트롤러를 추가하고 탐색 컨트롤러의보기를 창에 추가했습니다. 탐색 컨트롤러를 제거하고 뷰 컨트롤러의 뷰를 하위 뷰로 창에 추가하면 방향이 인식되지만 탐색 컨트롤러의 뷰를 추가하면 인터페이스 방향이 변경되지 않습니다. 참조로 좀 도와주세요. 다음은 내 코드입니다. - (BOOL) shouldAutorotateToInterfaceOrientation : (UIInterfaceOrientation) interfaceOrientation {인터페이스 방향이 자동으로 변경되지 않습니다.
if ([self.view isKindOfClass:[UINavigationController class]]) {
UIViewController *rootController = [((UINavigationController*)self.view).viewControllers objectAtIndex:0];
return [rootController shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}
return YES;
}
질문에 관련 코드를 포함하여 도와 드리겠습니다. –