Search code examples
swift4

How do I clear the 3 textField values on button "Save" click


The screenshot is shown here:

enter image description here

I entered the values in these 3 textField , Now on button "Save" click, I want to clear the text in those 3 textfield at a time.


Solution

  • Set empty text on save button click action.

    nameField.text = ""
    ageField.text = ""
    salaryField.text = ""