I have table view with UIButton , UILable and UITextfield
I have wrote in cellForRowAtIndexPath:
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
[cell addSubview:button];
[cell addSubview:lable];
[cell addSubview:textfield];
I have set the text on lable and textfield are working properly.
When i change the text on textfield are also working properly.
And i have other button for save data – it’s a out side of tableview but in the same view.
My Question is when i click save button i want to get text of tableview’s textfield.
Do you want the text in every text field or a single row’s?
Also, the code you use to create your table view cells isn’t doing what you want it to do. First you are trying to dequeue a reusable cell, which is great. But you then immediately overwrite that reused cell by alloc/initing a brand new cell every time. Only if cell == nil should you alloc/init a new one.