I have 2 ViewControllers and when I am in the second Viewcontroller I want to reach an IBOutlet in first ViewController. Although I instantiate I am always getting Fatal Error : "unexpectedly found nil while unwrapping an Optional value"
Here is my code
@IBAction func deleteCompanyPressed(_ sender: AnyObject) {
let vc = self.storyboard!.instantiateViewController(withIdentifier: "ReceivedChequeDetailVCID") as! ReceivedChequeDetailVC
vc.receivedCompanyOutlet.tintColor = UIColor.darkGray
vc.receivedCompanyOutlet.setTitle("Çekin Alındığı Firma / Kişi", for: .normal)
}
Error happens when it is trying to change the IBOutlet