Adicionar pop-up modal à anotação de mapa - Swift 3.0
Eu tenho vários pinos personalizados em um mapa e quando um usuário toca em um alfinete e o botão noCallout View
Gostaria de adicionar uma função que lança umModal Popup
usando o Scene Dock
Aqui está o meu 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
})
}
obrigado