I'm just starting with Swift and I have a doubt. I have a controlador_uno
: UIViewController
and another controlador_dos
: UITableViewController
.
The thing is that I send a varible by segue from controlador_uno
to two and in controlador_dos
it does not take it.
driver_one: UIViewController
override func prepareForSegue(segue: UIStoreboardSegue, sender: AnyObject?)
{
if segue.identifier == "SendDataSearch"
{
if let destino = segue.destinationViewController as ? Controlador_dos
{
destino.varSegue = txtNom.text
}
}
}
driver_two: UIUITableViewController {
var varSegue = ""
...
}
Can you pass variables from UIViewController
to UITableViewController
? I've done things from tableviewcontroller
to viewController
and they work.