After updating from Xcode 8 beta 5 to Xcode 8 final release, and after removing the override from all my prepare for segue methods, all of them are crashing at run time.
Here is an example of my code:
This is the action method for the button:
@IBAction func actionRequested(_ sender: AnyObject) {
if sender as! UIButton == shoppingButton
{
print("executed from inside of actionRequested Method")
performSegue(withIdentifier: "toShopping", sender: self)
}
}
This is the prepare for segue method.
// MARK: - Navigation
func prepare(for segue: UIStoryboardSegue, sender: AnyObject?) {
print("executed from inside of prepare For segue method")
if segue.identifier == "toShopping"
{
let newHomeViewController = segue.destination as! HomesTableViewController
newHomeViewController.profile = self.profile
}
}
This is the error:
executed from inside of actionRequested Method
fatal error: unexpectedly found nil while unwrapping an Optional value
2016-09-16 10:30:06.194590 Fredi[2567:551009] fatal error: unexpectedly found nil while unwrapping an Optional value
Note that all my prepare for segue methods were working before removing the override, and now I get the same error in all of them. Anyone could point me in the right direction to solve this ?
Thank you in advance.