                 case .delete:
                     let pinCoordinate = anObject as! Pin
                     let coordinate = CLLocationCoordinate2D(latitude: pinCoordinate.latitude, longitude: pinCoordinate.longitude)
-                    //self.mapView.removeAnnotation(annotation)
                 default:
                     break
             }

    
    var coordinate: CLLocationCoordinate2D?
    
    
    let delegate = UIApplication.shared.delegate as! AppDelegate
    var isDeletePin = false
    var fetchedResultsController : NSFetchedResultsController<NSFetchRequestResult>?{

        if isDeletePin {
            self.mapView.removeAnnotation(view.annotation!)
            fetchedResultsController!.managedObjectContext.delete(pin!)
            self.delegate.stack.save()
        }else{
            self.coordinate = view.annotation?.coordinate
            self.performSegue(withIdentifier: "photoAlbum", sender: self)
