I am trying to develop an app which allows the user to add records to a UITableView. I have most everything set up, but I have run into a problem when trying to implement the UITextFieldDelegate which I am trying to use for the data entry. Here's the full setup, any help or pointers would be appreciated as I've been wrestling with this for a few hours:
When the user clicks the add button it loads a new UITableView (grouped) to be used for data entry. The cells in this UITableView are custom cells which I developed in Interface Builder - each cell includes a label & a UITextField. After a good amount of research I figured out how to get the custom cells to load correctly.
The Label & TextField are linked up to a customCellClass in XCode which allows me to customize the loaded data at runtime. Up to this point, everything seems to be working. The problem is with the TextFieldDelegate setup:
I want to be able to adjust the TableView to show the appropriate cells when the keyboard is activated, so I am trying to setup the TableViewController as the delegate for the TextFieldDelegate. In order to do this, I set up the TableViewController as the FileOwner for the customCell in IB and linked the TextFieldDelegate up to the FileOwner. In Xcode I updated the TableViewController declaration to include the <UITextFieldDelegate>, but the delegate methods still aren't being called.
Trying another approach, when I switch the delegate to be the customCellClass, using the same approach in IB & xcode, the delegate methods do get called, but then I'm having a tough time figuring out how to access the TableView to adjust it accordingly.
I'm probably overlooking something basic here, but have been wrestling with it for a few hours and would love any pointers if anyone can help.
Thanks!
When the user clicks the add button it loads a new UITableView (grouped) to be used for data entry. The cells in this UITableView are custom cells which I developed in Interface Builder - each cell includes a label & a UITextField. After a good amount of research I figured out how to get the custom cells to load correctly.
The Label & TextField are linked up to a customCellClass in XCode which allows me to customize the loaded data at runtime. Up to this point, everything seems to be working. The problem is with the TextFieldDelegate setup:
I want to be able to adjust the TableView to show the appropriate cells when the keyboard is activated, so I am trying to setup the TableViewController as the delegate for the TextFieldDelegate. In order to do this, I set up the TableViewController as the FileOwner for the customCell in IB and linked the TextFieldDelegate up to the FileOwner. In Xcode I updated the TableViewController declaration to include the <UITextFieldDelegate>, but the delegate methods still aren't being called.
Trying another approach, when I switch the delegate to be the customCellClass, using the same approach in IB & xcode, the delegate methods do get called, but then I'm having a tough time figuring out how to access the TableView to adjust it accordingly.
I'm probably overlooking something basic here, but have been wrestling with it for a few hours and would love any pointers if anyone can help.
Thanks!