         super.viewDidLoad()
 
         
-        
+    
         let devices = AVCaptureDevice.devices().filter{ ($0 as AnyObject).hasMediaType(AVMediaTypeVideo) && ($0 as AnyObject).position == AVCaptureDevicePosition.back }
         captureDevice = devices.first as? AVCaptureDevice
         if (captureDevice?.isFlashModeSupported(.auto))!{

import UIKit
import AVFoundation

class ViewController: UIViewController {
    
    let captureSession = AVCaptureSession()

        cameraPreview.layer.addSublayer(previewLayer!)
        cameraPreview.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(saveToCamera)))
        
        let line = CustomLine()
        line.frame = (previewLayer?.frame)!
        line.backgroundColor = UIColor.clear
        cameraPreview.addSubview(line)
        
        
        let btnTakePicture = UIButton()
