1
이상한 문제가 있습니다. 내 앱에 비디오를 녹화하고 있습니다. 장치를 180도 회전 할 때까지 모든 것이 잘 작동합니다. 어떤 가로 모드에서 비디오를 올바르게 시작했는지는 중요하지 않지만 가로 방향으로 예를 들어 돌리면 비디오가 세로로 기록되기 시작합니다. AVCaptureVideoPreviewLayer 방향이 잘못되었습니다
나는 그런 비디오 방향을 설정하려고 : 내가 보여 무승부를 만든 - (BOOL) shouldAutorotate {
UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIInterfaceOrientationLandscapeLeft) {
NSLog(@"Left");
captureVideoPreviewLayer.connection.videoOrientation = AVCaptureVideoOrientationLandscapeLeft;
return YES;
}
else if(orientation == UIInterfaceOrientationLandscapeRight) {
NSLog(@"Right");
captureVideoPreviewLayer.connection.videoOrientation = AVCaptureVideoOrientationLandscapeRight;
return YES;
}
return NO;
} 을하지만이 전혀 작동하지 않는 것 같습니다. captureVideoPreviewLayer.frame = self.view.bounds;를 설정했습니다. 아직도 작동하지 않습니다.
'statusBarOrientation'는 아이폰 OS 9.0의 추천되지 않습니다 : 나는 여기
해야 당신이
shouldAutorotate
방법에서 그것을 호출하여 시도 할 수있는 모든 방법을 생각합니다. – rmaddy