2014-01-08 2 views
0

enter image description here 내 응용 프로그램은 초상화 모드에서 올바르게 실행되고 훌륭하게 작동하지만 일부 응용 프로그램에서는 가로 모드 만 지원하고 일부는 가로 모드와 인물 모드를 지원합니다. 모두 방향을 지원하고 초상화에 장치를 회전하고 뒤로 버튼을 누르면 몇 가지보기로 지원 만 풍경에서, 가로보기 자동으로 전 방향Iphone Portraits 모드가 다시 가로 모드로 전환됩니다. 자동으로 모드가 작동하지 않습니다.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return YES; 
} 


- (BOOL)shouldAutorotate 
{ 
    return YES; 
} 




- (NSInteger)supportedInterfaceOrientations 
{ 
    return UIInterfaceOrientationMaskLandscapeLeft; 
} 

을 설정하려면 다음 코드를 사용

회전되지 않는다 감사합니다

답변

2

편집이 라인

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return YES; 
} 

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    if (toInterfaceOrientation == UIInterfaceOrientationMaskLandscapeLeft) { 
     return YES; 
    } 
    else { 
     return NO; 
    } 
}