DetailViewController:
@IBOutlet var selectedBundesland: UILabel!
TableViewController:
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
if (segue.identifier == "BackToCalculator") {
var vc:FirstViewController = segue.destinationViewController as FirstViewController
vc.selectedBundesland.text = "Test"
}
IBOutlet is connected!
Error: fatal error: unexpectedly found nil while unwrapping an Optional value
I read multiple pages about Optionals but i didn't know the answer to my problem.
Do you need more information about my project?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…