diff --git a/CHANGELOG.md b/CHANGELOG.md index d730678..f671c29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ # CHANGELOG ## Master + +## Version 4.0.0 - Fixes an issue when Record button isn't getting correct callbacks - Fixes an when didFinishRecordingVideo wouldn't get a callback +- Using allowAutoRotate=false prevents layer from rotating. ## Version 3.0.0 - Swift 4.2 support diff --git a/Source/SwiftyCamViewController.swift b/Source/SwiftyCamViewController.swift index 61da7b8..1497a33 100644 --- a/Source/SwiftyCamViewController.swift +++ b/Source/SwiftyCamViewController.swift @@ -346,8 +346,12 @@ open class SwiftyCamViewController: UIViewController { /// ViewDidLayoutSubviews() Implementation private func updatePreviewLayer(layer: AVCaptureConnection, orientation: AVCaptureVideoOrientation) { - layer.videoOrientation = orientation - + if(shouldAutorotate){ + layer.videoOrientation = orientation + } else { + layer.videoOrientation = .portrait + } + previewLayer.frame = self.view.bounds }