 extension GEImagePicker : UIImagePickerControllerDelegate,UINavigationControllerDelegate {
     
     
-    func imagePickerController(picker: UIImagePickerController,
+    func imagePickerController(_ picker: UIImagePickerController,
         didFinishPickingImage image: UIImage,
         editingInfo: [String : AnyObject]?) {
         
-        picker.dismissViewControllerAnimated(true) { () -> Void in
+        picker.dismiss(animated: true) { () -> Void in
             
             if self.callback != nil {
                 

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

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