I'd like to pass values from one tableView to another.
I took a value through indexPath.row, I would like to send the value to another tableView so that it can make a switch to display different views.
I'd like to pass values from one tableView to another.
I took a value through indexPath.row, I would like to send the value to another tableView so that it can make a switch to display different views.
Vlw Galera for the answers, but in some situations in swift I prefer not to use init. So I decided that way.
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
var ProxViewController = segue.destinationViewController as! ViewControllerAnalseOP1
ProxViewController.indice = self.indiceClicado
}
So, if you do not understand, you can ask about the catch,:)
There is also the possibility of storing the data in a Singleton class, which is a design pattern, if in case it is necessary that the data be available for several classes to use. As an example, classes that store user session data. Here's an example how-to link, with more detailed explanations: Design Patterns in Swift