views:

37

answers:

1

Hi Guys,

I got a problem in textfields.Actually I have 4 textfields when I click on to the first textfield and i entered the text into it.If I click on to the next textfield with out clicking on to the Done button in the keyboard of the first textfield the view goes up and the text in the first textfield is erased.

To solve this problem I used [TextField2 setUserInteractionEnabled:NO]; to disable the textfield until the first textfield should completes.

But I heard that Disabling the User Interface is a wrong process and its not a good idea to use in Iphone Apps.

So I got an Idea when we are typing the text into the textfield itself the text in the textfield should be saved.

Hey guys please help me how to get this.

Any one's help will be appreciated.

Thank you, Monish Kumar.

A: 

Are your text fields inside a UITableView? If so, make sure you don't reuse cells or reload data.

Costique
yes My textfields are in the cells of the tableView.
monish
Do you reuse the table cells containing the text fields? Do you create the text fields once and just add them to the cells in your data source implementation? Otherwise you might accidentally replace a text field with a new one which doesn't contain any text.
Costique
Yes Im reusing the table cells containing the textfields because Im having more than 12 cells in a tableview.i tried by not reusing the cells the same problem has been accoured again.
monish