I have 2 UIButtons
on a view.
Each of them are linked to 2 different views.
They have to pass different data depending which button you just tapped.
I k
You could switch it...
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if let identifier = segue.identifier {
switch identifier {
case "matchSegue":
let controller = segue.destinationViewController as! ResultViewController
controller.match = self.match
case "historySegue":
let controller = segue.destinationViewController as! HistoryViewController
controller.history = self.history
}
}
}