 		
 		self.previewLayer = AVCaptureVideoPreviewLayer(session: self.captureSession)
 		self.previewLayer.videoGravity = AVLayerVideoGravityResizeAspect
-		self.previewLayer.connection.videoOrientation = self.currentOrientation.toAVCaptureVideoOrientation()
 		self.previewLayer.frame = self.view.bounds
 		
 		let rootLayer = self.view.layer

		self.motionManager.gyroUpdateInterval = 0.5
	}
	
	public func updateLayoutForCurrentOrientation() {
		let newAngle = self.currentOrientation.toAngleRelativeToPortrait() - self.originalOrientation.toAngleRelativeToPortrait()

		if self.allowsRotate {

}

// MARK: - Utilities

public extension UIInterfaceOrientation {
	
	func toDeviceOrientation() -> UIDeviceOrientation {
		switch self {
		case .Portrait:
			return .Portrait
		case .PortraitUpsideDown:
			return .PortraitUpsideDown
		case .LandscapeRight:
			return .LandscapeLeft
		case .LandscapeLeft:
			return .LandscapeRight
		default:
			return .Portrait
		}
	}
}

public extension UIDeviceOrientation {
	
