Post

Replies

Boosts

Views

Created

How can I auto-populate a Text Field once a button is selected?
I currently have a button and a text field, named offlineListing and productURLField respectively. I am trying to automatically input the text "N/A" into the productURLField once offlineListing has been selected by using the following syntax: @IBOutlet weak var productURLField: UITextField! @IBAction func offlineListing(_ sender: Any) { let productURLField = "N/A" } However once the button is selected, nothing happens. Is there a reason as to why this isn't working properly?
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
968
May ’21
How can I auto-populate a Text Field once a button is selected?
I currently have a button and a text field, named offlineListing and productURLField respectively. I am trying to automatically input the text "N/A" into the productURLField once offlineListing has been selected by using the following syntax: @IBOutlet weak var productURLField: UITextField! @IBAction func offlineListing(_ sender: Any) { let productURLField = "N/A" } However once the button is selected, nothing happens. Is there a reason as to why this isn't working properly?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
968
Activity
May ’21