Agregar ventana emergente modal a la anotación de mapa - Swift 3.0
Tengo varios pines personalizados en un mapa y cuando un usuario toca un pin y luego el botónCallout View
Me gustaría agregar una función que inicie unModal Popup
utilizando Scene Dock
Aquí está mi código:
func mapView(_ mapView: MKMapView, annotationView view: MKAnnotationView, calloutAccessoryControlTapped control: UIControl) {
// here I would like to launch a Modal Popup using Scene Dock
popInfo.center = view.center
popInfo.transform = CGAffineTransform(scaleX: 0.8, y: 1.2)
self.view.addSubview(popInfo)
UIView.animate(withDuration: 0.3, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0, options: [], animations: {
self.dimView.alpha = 0.8
self.popInfo.transform = .identity
})
}
Gracias