0

Help with buttons in Swift!!!

Need help updating text in a function?? Swift Code I’m trying to get the textLabel.text to update to the user’s entry into the textField once the “Set Text” button is tapped. I know the code is supposed to go inside the setTextButtonTapped function but I’m stuck. @IBOutlet weak var textLabel: UILabel! @IBOutlet weak var textField: UITextField! @IBAction func setTextButtonTapped(_sender: UIButton) { // ??? }

8th Nov 2019, 3:03 PM
Lauren
1 Odpowiedź
0
You should make the text that was written in textField is a string
10th May 2020, 11:31 AM
Mehmet Vecdi Gonul
Mehmet Vecdi Gonul - avatar