         super.init(nibName: nil, bundle: nil)
         onCompletion = completion
         allowCropping = croppingEnabled
+        cameraOverlay.hidden = !allowCropping
         libraryButton.enabled = allowsLibraryAccess
         libraryButton.hidden = !allowsLibraryAccess
     }

    
    internal func cameraReady() {
        cameraButton.enabled = true
    }
    
    internal func rotate() {
        let rotation = currentRotation()
        let rads = CGFloat(radians(rotation))
        
        UIView.animateWithDuration(0.3) {
            self.cameraButton.transform = CGAffineTransformMakeRotation(rads)
            self.closeButton.transform = CGAffineTransformMakeRotation(rads)
            self.swapButton.transform = CGAffineTransformMakeRotation(rads)
            self.libraryButton.transform = CGAffineTransformMakeRotation(rads)
        }
    }

    private func checkPermissions() {

            cameraButton.enabled = false
            closeButton.enabled = false
            swapButton.enabled = false
            libraryButton.enabled = false
            cameraView.capturePhoto { image in
                guard let image = image else {
                    self.cameraButton.enabled = true
                    self.closeButton.enabled = true
                    self.swapButton.enabled = true
                    self.libraryButton.enabled = true
                    return
                }
                self.saveImage(image)
