Hi,
I am coding an application on Xcode for IOS and I would like to send a variable to another ViewController. The problem is that when I want to send from the controller called "Step1" to set the label of my second view controller called "Step2". To do this I proceed in this way in "Step 1":
guard let step2 = self.storyboard?.instantiateViewController(withIdentifier: Step2) as? EndConfiguration else
{
fatalError("Error when trying to get the reference to the Step 2")
}
step2.nameLabelOutlet?.text = "Jonh"
But my label is not set... Could someone help me with this problem?
Thank you in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…