2012-05-24 8 views
1

오케이, 이것은 아마도 꽤 멍청한 짓입니다. 그러나 나는 그것을 해결하는 방법을 찾지 못했습니다. iPad UIViewController를 스토리 보드로 드래그하고 방향을 YES로 설정했습니다. 그러나 어떤 이유로 뷰가 회전하지 않습니다. 상단의 상태 표시 줄은 회전하고 있지만 iPad를 돌리면보기, 표보기 및 라벨이 회전하지 않습니다. 누구나 왜 고쳐야하는지 알고 있습니까?오리엔테이션 iOS 스토리 보드가 회전하지 않습니까?

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOr‌​ientation { return YES; } 

답변

3
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    // Return YES for supported orientations 

    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { 
     //return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); 
     if ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight)) { 
      //implement your code 
     return (interfaceOrientation != UIInterfaceOrientationLandscapeRight); 
    } else { 

     return YES; 
    } 
} 

나는 그것이 당신에게 도움이 될 것이라고 생각합니다.

2

상태 표시 줄이 돌아가는 것은 일부 모달 세구가 제대로 체크 해제되지 않았 음을 의미 할 수 있습니다. 또한 탐색 컨트롤러에서 스택의 모든보기가 YES를 반환하도록 설정되어 있는지 확인합니다.

관련 문제