Also, did you set the XIB in the storyboard to your subclass and drag the UITextField to your property?
I found a solution without an extra xib file: just using a Prototype Cell in the tableView.
Class: MyTableViewCell Style: Custom Identifier: “Cell with TextField”
The Prototype Cell has in it’s Connections Inspector an Outlet named “textField”; Control-Drag from the empty circle at the right to the UITextField.
This Control-Dragging from the Connections Inspector was a new trick (for me). Took me a while to find this.
On Sep 26, 2018, at 4:25 AM, Gerriet M. Denkmann <g@...> wrote:
On 26 Sep 2018, at 14:30, Alex Zavatone via Groups.Io <zav@...> wrote:
Use an XIB for the subclass of tableViewCell, create a UIOutlet property for the UITextField, assign the subclass to the XIB’s class and wire up the UIOutlet property to the UITextField. Don’t forget to give the UITableViewCell an Identifier keyword.
Make sure to set the tableView to register the subclass for the cell if needed. I can dig up my working source, but it will be about 8 hours.
[tableView:cellForRowAtIndexPath:] will dequeueReusableCellWithIdentifier: "Cell with TextField" *** Terminating app due to uncaught exception ‘NSUnknownKeyException', reason: '[<NSObject 0x6000032aeb80> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key textField.'