feat: Add button to open subscriptions page from simulator result

This commit is contained in:
Andrea Busi
2020-11-21 12:29:29 +01:00
parent c9b4ef1aa5
commit 024a7c6333
3 changed files with 19 additions and 1 deletions
@@ -224,10 +224,18 @@ class AlertSimulatorViewController: UIViewController, MKMapViewDelegate {
}
let alert = UIAlertController(title: NSLocalizedString("main_simulator", comment: ""), message: message, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: NSLocalizedString("globe_simulation_priority", comment: ""), style: .default) { (action) in
self.navigateToSubscriptions()
})
alert.addAction(UIAlertAction(title: NSLocalizedString("Ok", comment: ""), style: .cancel, handler: nil))
present(alert, animated: true)
}
private func navigateToSubscriptions() {
let controller = SubscriptionsViewController.makeController()
navigationController?.pushViewController(controller, animated: true)
}
// MARK: MKMapViewDelegate
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {