2011-09-16 5 views
0

탐색보기 컨트롤러가 있습니다. 내가 tableview 셀을 선택하면 UIInterfaceOrientationPortrait 상태에서 새 ViewController를 푸시합니다.UIViewController를 회전하십시오.

이제 새로운 ViewController 가로 모드를 회전하고 새 ViewController를 팝하고 테이블보기 Navigation Controller 메인 페이지로 돌아 가면 NavigationController 기본 페이지가 이전 UIInterfaceOrientationPortrait 모드이고 아래층을 볼 수 없다는 것을 알 수 있습니다. 내 tableView 인터페이스의 일부.

어떻게하면 newViewController가 팝업되면 Main Navigation ViewController 페이지가 newViewController의 오리엔테이션 모드를 얻는 방법을 볼 수 있도록 수정해야합니다.

newViewController가 기본 모드보다 가로 모드 인 경우, newViewController가 세로 모드 인 경우 메인 탐색 페이지는 자동으로 세로 모드입니다.

아무 해결책 ????

답변

1

모든 탐색 컨트롤러 (탐색 스택의) 구현 파일에 다음을 추가하십시오.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 

    return YES; 
} 
관련 문제