I have created a UIAlertView. The main content is loaded with JSON and I want that when I click "Completo" button
, the content change to another variable value completo
. When I hit Mapa
I need to open a map. And when I click Atrás
it should close the alert (right now all the buttons close it).
var tabla: String = "" // JSON Data
...
@IBAction func Itinerario(sender: AnyObject) {
let alert = UIAlertView(title: "Itinerario de Procesión", message: (tabla), delegate: nil, cancelButtonTitle: nil, otherButtonTitles: "Completo", "Mapa", "Atrás")
alert.show()
}
Also I wanted to change buttons color.
I am getting this advice: /Users/Javi/Desktop/ElPenitente/El Penitente/Domingo R.swift:87:21: 'UIAlertView' was deprecated in iOS 9.0: UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead