이미지 선택 관리자를 모달로 추가 한 vc가 있고 사진을 선택하면 동일한 vc로 돌아갑니다. PickerController를 통해 이미지를 얻은 후에는 이미지를 화면에 추가하고, 사진이 가로 인 경우 장치가 가로로 자동 변경되도록하고 그림이 세로 인 경우 세로로 장치를 변경합니다.장치가 강제로 UIOrientation을 변경할 수 없습니다.
나는 실패 그냥 사진에 대한 별도의 VC를 인스턴스화하는 것이 가장 좋습니다 만약 내가 궁금하네요,
1.
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeLeft];
2.
[UIViewController attemptRotationToDeviceOrientation];
-(NSUInteger)supportedInterfaceOrientations
{
if (!isPortrait) //isPortrait is false when pic is landscape
return UIInterfaceOrientationMaskLandscape;
}
또는 풍경에 장치를 강제로 이러한 방법을 모두 시도했습니다. 나는이 question