                     finalImage = editingInfo![UIImagePickerControllerOriginalImage] as? UIImage
                 }
                 
-                self.callback!(image: finalImage!,status: GEImagePickerStatus.OK)
+                self.callback!(finalImage!,GEImagePickerStatus.ok)
             }
         }
     }
     
-    func imagePickerControllerDidCancel(picker: UIImagePickerController) {
-        
-        picker.dismissViewControllerAnimated(true) { () -> Void in
+    func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
+        
+        picker.dismiss(animated: true) { () -> Void in
             
             if self.callback != nil {
-                self.callback!(image: nil,status: GEImagePickerStatus.Cancelled)
+                self.callback!(nil,GEImagePickerStatus.cancelled)
             }
         }
     }

                            picker.delegate = delegate
                            picker.allowsEditing = edit
                            picker.sourceType = type
                            whe.presentViewController(picker, animated: true, completion: nil)
                            
                            var aoKey = ""
                            objc_setAssociatedObject(picker,

                            }))
            
                            actionSheet.addAction(UIAlertAction(title: "Saved Photos Album",
                                style: UIAlertActionStyle.default,
                                handler: { (action) -> Void in
                                    
                                self.pickImage(GEImagePickerSource.savedPhotosAlbum,
                                    whereViewController: whereViewController,
                                    editMode: editMode,
                                    completion: completion)
