text field passing data code example
Example: text field passing data
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let secondController = segue.destination as! TwoViewController
secondController.theLabel = textField.text!
}
@IBAction func buttonEnterTap(_ sender: Any) {
if textField.text != "" {
performSegue(withIdentifier: "segueOne", sender: self)
}
}