Let's say:
- I have class
String
containing an empty string variablea
- In page 1, I need to set variable a = "string here"
- In page 2, I need to call the value of
a
How can I do that?
Let's say:
String
containing an empty string variable a
a
How can I do that?
from page 1
let nextview = self.storyboard?.instantiateViewController(withIdentifier: "Page2Identifier") as! Page1Controller
nextview.prevscreen = a
self.navigationController?.pushViewController(nextview, animated: true)
in Page 2
var prevscreen = ""