     }
 
 
-    open func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
+    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
 
         let selectedPhoto: UIImage
         if canEditImage {

            selectedPhoto = info[UIImagePickerControllerOriginalImage] as! UIImage
        }
		self.handler?(SRKCameraResponse.success(selectedPhoto))
        self.dismiss(animated: false, completion: nil)
    }
	
	public func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
		self.handler?(SRKCameraResponse.cancelled)
		self.dismiss(animated: false, completion: nil)
	}
}

}

public struct SRKCamera {
	private static let shared = SRKCameraViewController()
	public static func openCameraController(viewController: UIViewController,
											sourceType: UIImagePickerControllerSourceType = .photoLibrary,
	                                        cameraDevice: UIImagePickerControllerCameraDevice = .front,
	                                        canEditImage: Bool = true,
	                                        handler: @escaping ((SRKCameraResponse) -> Void)
	                                        ) {
		SRKCamera.shared.sourceType = sourceType
		SRKCamera.shared.cameraDevice = cameraDevice
		SRKCamera.shared.canEditImage = canEditImage
		SRKCamera.shared.handler = handler
		viewController.present(SRKCamera.shared, animated: false, completion: nil)
	}
}

class SRKCameraViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {

    var canEditImage = true
	var sourceType: UIImagePickerControllerSourceType = .photoLibrary
    var cameraDevice: UIImagePickerControllerCameraDevice = .front
	var handler: ((SRKCameraResponse) -> Void)?

    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func viewDidAppear(_ animated: Bool) {
		super.viewDidAppear(animated)
		self.presentCamera()
    }
