facing a nil exception while passing the property of text of a label on the FirstVC and reflecting it to the SecondVC on a Label aswell.
Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
https://github.com/marlhex/PasingDataAroundVC
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "toSecondSegue" {
// Instance to the next screen
let svc = segue.destination as! SecondVC
// Assigning the same value to the next screen
svc.sameName!.text = self.originalName.text
}
}
Does anyone knows how to pass the data accordingly?
I know the default value of the property of text of the label will be nil, but I am just stopped by this, I know, incredible