i have a custom uitableviewcell with a label and a textfield now i want to pass the data from the textfield when it is changed to the uitableviewcontroller.
The tableview is populated with data from a sqlite database that is wrapped with fmdb and the number of tableviewcells is different in every db i use in the app. How many fields there are and what name they have is stored in the db, the population of the table works fine.
I managed to get a "EditingDidEnd" event from the textfield in the cells to my view controller, the event is used to activate a toolbar button for saving changes. I did this via the cell.fieldData.addTarget(self, action: "SaveButtonOn:", forControlEvents: UIControlEvents.EditingDidEnd)
on creating the Cells in
tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath)
.
My problem is now that i need to get the data from the textfields inside the cells. I have found some code and tutorials for passing parameters to the via addTarget() but only for buttons and i don't know if that is usable for textfields.
If you need more information just ask, i hope you can decipher what i need to do.
Thanks for any answers Adarkas