2013-05-27 2 views
1

하드웨어 -> 왼쪽 또는 오른쪽으로 회전하여 iPad/iPhone 시뮬레이터의 방향을 쉽게 변경할 수 있습니다. 그러나 iDevice (iPad 기기 또는 iPhone 기기)에서 어떻게 변경합니까?iDevice (iPhone/iPhone)의 방향을 변경하는 방법은 무엇입니까?

누군가 나를 도울 수 있습니까?

일부 코드를 추가해야합니까? 파일

지원에 .plist 파일 enter image description here

+6

당신이 당신의 질문을 설명 할 수에 Initial interface orientation 키/값을 추가 하시겠습니까? 내가 아는 한, 실제 장치의 방향을 바꾸려면 손으로 장치를 회전해야합니다. : D – Khawar

+0

보기, iPad 장치에서 내 응용 프로그램을 실행하고 있는데, 가로 모드로 표시되지만 세로 모드로 나타나기를 원합니다. – CarinaM

답변

1

요약 탭으로 이동하여 아래로 스크롤하여 "iPad 배치 정보"로 이동하십시오. "지원되는 인터페이스 방향"의 네 가지 옵션을 모두 선택 취소하십시오. 그런 다음 다시 선택하고 Portrait first를 선택한 후 나머지를 선택하십시오. 당신이 세로 모드로 기대 또한보기

enter image description here

, 단지이 도움이

- (NSUInteger)supportedInterfaceOrientations { 
    return UIInterfaceOrientationMaskAll; 
} 

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation 
{ 
    return (orientation == UIInterfaceOrientationMaskAll); 
} 

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 
{ 
    return UIInterfaceOrientationPortrait; 
} 

희망을 추가합니다.

0

이동 당신이 볼 지원되는 인터페이스 방향 키

Item 0 String Portrait (top home button) 
Item 1 String Portrait (bottom home button) 
Item 2 String Landscape (left home button) 
Item 3 String Landscape (right home button) 

enter image description here

+0

이 이미 내 애플리케이션에 추가되었습니다. 위의 스크린 샷보기 – CarinaM

0

을 UIApplication의 setStatusBarOrientation 것이다 가짜를 호출 아래에있는 추가 합니다 회전