 @objc(QRScanner)
 class QRScanner : CDVPlugin, AVCaptureMetadataOutputObjectsDelegate {
 
-    var cameraView: UIView = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.mainScreen().bounds.width, height: UIScreen.mainScreen().bounds.height))
+    var cameraView: UIView!
     var captureSession:AVCaptureSession?
     var captureVideoPreviewLayer:AVCaptureVideoPreviewLayer?
     var metaOutput: AVCaptureMetadataOutput?


    enum LightError: ErrorType {
        case torchUnavailable
    }

    func sendErrorCode(command: CDVInvokedUrlCommand, error: QRScannerError){

        }
    }

    func pageDidLoad() {
      self.webView?.opaque = false
      self.webView?.backgroundColor = UIColor.clearColor()
    }

    // ---- BEGIN EXTERNAL API ----

    func prepare(command: CDVInvokedUrlCommand){
