I would like for each of the cells in UITableView be an entry field. In other words when the table appears and a user clicks/taps on a specific cell, the keyboard will appear and what ever the user types gets enter into the field. I will later use all these field as data in an array, for other uses.
Share
Add a
UITextFieldto each cell (design a.xibfile for the cells and programmatically load the.xibas part of your table-view implementation). ImplementUITextFieldDelegate, probably thetextFieldShouldEndEditing:method because you might want to validate the input first and not let editing finish until the input is valid. In that method, if input is valid then store it in the array corresponding to what you were talking about. You’ll need to do some tricks to find out what row you’re currently validating, there’s several ways to do it (one of which is shown here).