 		
 		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

}

// MARK: - Utilities

public extension UIDeviceOrientation {
	

			self.motionManager.startAccelerometerUpdatesToQueue(NSOperationQueue.currentQueue()!, withHandler: { accelerometerData, error in
				if error == nil {
					let currentOrientation = accelerometerData!.acceleration.toDeviceOrientation() ?? self.currentOrientation
					if self.originalOrientation == nil {
						self.initialOriginalOrientationForOrientation()
					}
					if self.currentOrientation != currentOrientation {
						self.currentOrientation = currentOrientation
						self.updateContentLayoutForCurrentOrientation()
					}
				} else {
					print("error while update accelerometer: \(error!.localizedDescription)", terminator: "")
