 import Foundation
 
 @available(iOS 8.0, *)
-@objc public class BRCameraPlugin: NSObject, BRHTTPRouterPlugin, UIImagePickerControllerDelegate, UINavigationControllerDelegate, CameraOverlayDelegate {
+@objc public class BRCameraPlugin: NSObject, BRHTTPRouterPlugin, UIImagePickerControllerDelegate,
+                                   UINavigationControllerDelegate, CameraOverlayDelegate {
     
     let controller: UIViewController
     var response: BRHTTPResponse?

                }
                let id = try self.writeImage(img)
                print(["[BRCameraPlugin] wrote image to \(id)"])
                let respData = [
                    "id": id
                ]
                resp.provide(200, json: respData)
            } catch let e {
                print("[BRCameraPlugin] error writing image: \(e)")
                resp.provide(500)

            self.response = response
            
            dispatch_async(dispatch_get_main_queue()) {
                let picker = UIImagePickerController()
                picker.delegate = self
                picker.sourceType = .Camera
                picker.cameraCaptureMode = .Photo
                
                // set overlay
                if let overlay = request.query["overlay"] where overlay.count == 1 {
                    print(["BRCameraPlugin] overlay = \(overlay)"])
                    let screenBounds = UIScreen.mainScreen().bounds
                    if overlay[0] == "id" {
                        picker.showsCameraControls = false
                        picker.allowsEditing = false
                        picker.hidesBarsOnTap = true
                        picker.navigationBarHidden = true
                        
                        let overlay = IDCameraOverlay(frame: screenBounds)
                        overlay.delegate = self
                        overlay.backgroundColor = UIColor.clearColor()
                        picker.cameraOverlayView = overlay
                    }
                }
                self.picker = picker
                self.controller.presentViewController(picker, animated: true, completion: nil)
            }
            
            return response
