I am trying to create a table view where the user can edit the textfield on each cell. Each cell also allow the transition to another detail view controller. When the user tap on the cell's textfield, it should allow editing and storing the input text to an array respectively.
The problem is that, how do I check the cell/row selected when the textfield is tapped using Swift? (I am able to check the cell being tapped, but not for the case of the textfield in the cell.)
There's a couple ways to do this.
The superview property of your text field will be your UITableViewCell (unless you have it embedded within another view in the middle).
In my own code, I often subclass UITableViewCell (and sometimes even the controls within the cell) to give it a property which indicates which row number we're working with.