diff --git a/camera/CameraManager.swift b/camera/CameraManager.swift index 22d1037..7dd5887 100644 --- a/camera/CameraManager.swift +++ b/camera/CameraManager.swift @@ -57,6 +57,8 @@ public class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate { /// Property to determine if manager should write the resources to the phone library. Default value is true. public var writeFilesToPhoneLibrary = true + + public var shouldRespondToOrientationChanges = true /// The Bool property to determine if current device has front camera. public var hasFrontCamera: Bool = { @@ -533,7 +535,7 @@ public class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate { } private func _startFollowingDeviceOrientation() { - if !cameraIsObservingDeviceOrientation { + if shouldRespondToOrientationChanges && !cameraIsObservingDeviceOrientation { NSNotificationCenter.defaultCenter().addObserver(self, selector: "_orientationChanged", name: UIDeviceOrientationDidChangeNotification, object: nil) cameraIsObservingDeviceOrientation = true }