             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)

        flashButton.action = toggleFlash
        
        checkPermissions()
        rotate()
        
        cameraView.configureFocus()
    }
    
    public override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
        return .Portrait
    }
    
    public override func viewWillAppear(animated: Bool) {

                self.cameraButton.enabled = true
                self.closeButton.enabled = true
                self.swapButton.enabled = true
                self.libraryButton.enabled = true
                self.showNoPermissionsView(true)
            }
            .save()
