I have a table view with two rows, each with a text field. One text field is for username and the other for password. When I click on a button, I want to clear both fields and replace the contents with the intial placeholders.
I tried [mytableview reloadData];. That just reloads the table view; the text fields are not cleared. The placeholders are appearing over the text entered while editing the text field, and the next time I try to edit the text field, the text is drawn over the first text.
I have a table view with two rows, each with a text field. One
Share
on your button click:-
do
yourtextfieldname.text=@"";or if you have made a text field in table view methods so in that condition on your button click do
[tableView reloadData]and at cellForRowAtIndexPath write yourtextfieldname.text=@””;and set placeholder also.