Im very new to xcode.
Im getting the user to select from a UIPicker view and when they click a submit button it goes to the next screen and displays what they chose.
I got it to work with normal textboxes with segue code
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let viewController2 = segue.destination as?
ViewController2 {
viewController2.textstr = textField.text
}
}
but i dont really know to apply the same formula with UIPickers, Segments and Steppers
3
Answers
You can use this:
And then:
you can pass value from using thing code.
I hope you find it helpful. Best of luck
Try This Once:
This Will be picked your yourArray’s Value
**Then You want to pass selected data first to second viewController using segue code **
SecondViewController look like it: