I am trying to get simple Int64
passed between 2 components in Swift, however, the value is never set.
This is my first tableViewController where I want to pass the data 2
from:
func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?){
if (segue.identifier == "transactionDetailSegue") {
let transactionDetailViewController = segue.destination as? TransactionDetailTableViewController
transactionDetailViewController?.id = 2
}
}
And this is where I want to receive it:
import UIKit
class TransactionDetailTableViewController: UITableViewController {
@IBOutlet weak var nameText: UILabel!
var id = 0;
override func viewDidLoad() {
super.viewDidLoad()
dump(id)
}
}
I made sure twice that the segue identifier is the right one, and checked various tutorials, but I am still not sure what goes wrong.
Thank you