From ddffdac96ec6310d0256e233d93a5ae2f1461ede Mon Sep 17 00:00:00 2001 From: Natalia Terlecka Date: Fri, 11 Dec 2015 11:37:45 +0000 Subject: [PATCH] Start and stop following device orientation notification resumed. --- camera/CameraManager.swift | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/camera/CameraManager.swift b/camera/CameraManager.swift index 407838c..8ef7fc0 100644 --- a/camera/CameraManager.swift +++ b/camera/CameraManager.swift @@ -58,7 +58,16 @@ 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 + /// Property to determine if manager should follow device orientation. Default value is true. + public var shouldRespondToOrientationChanges = true { + didSet { + if shouldRespondToOrientationChanges { + _startFollowingDeviceOrientation() + } else { + _stopFollowingDeviceOrientation() + } + } + } /// The Bool property to determine if current device has front camera. public var hasFrontCamera: Bool = {