2012-02-14 2 views
2

Master View Controller 및 Detail View Controller를 사용하여 UINavigationController를 만들고 싶습니다.방향이 다른 UINavigation 컨트롤러

Master View Controller는 Portrait 및 LandscapeRight로 회전 할 수 있지만 Detail View Controller는 LandscapeRight에서만 볼 수 있습니다 (Detail에는 동영상이 표시됨).

이 설정하는 가장 좋은 방법은 무엇입니까?

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 

    return interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeRight; 
} 

을하고 상세보기 컨트롤러 트릭을 할해야

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 

    return interfaceOrientation == UIInterfaceOrientationLandscapeRight; 
} 

에 :

답변

2

나는 당신의 마스터 뷰 컨트롤러에

코드

의 다음 행을 추가 추천 할 것입니다. 아이폰 OS 7

+0

에 허용되는의 ViewController를 알 수 있습니다. – cannyboy

0

, 방법

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 

이 중단되었다. 그러나 예/아니요를 반환하려면

- (BOOL)shouldAutorotate 

을 사용하면됩니다.

만이 간단한 것이 있다면 당신은, 방향이 lordy 오

- (NSUInteger)supportedInterfaceOrientations 
관련 문제