What I got is a TableView which is using Prototype Cells and an array feeding the dataSource - depending on the datasource, I'm using a certain Table View Cell identifier to build the cells. (Please correct me if I'm doing something wrong here - I am new to iOS dev and am looking for best practices wherever possible :)
Anyway, one of the Table View Cell I've created in Storyboard has a UITextField. I have it set up in Storyboard GUI that the Return Key is set to 'Done' and 'Auto-enable Return Key' is checked. I've then gone into my controller and used the following code:
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return YES;
}
- (void)textFieldDidEndEditing:(UITextField *)textField{
[textField resignFirstResponder];
NSLog(@"finished change...");
}
I've also got a 'Editing Did End' event linked to my controller which is coded to output to NSLog.
The Log outputs the text placed in textFieldDidEndEditing and my event function when I hit Return or Done. However, when I select a table cell, or start moving the slider nothing happens - meaning the keyboard is still on the screen.
Is there a way to resolve this?
Also, whilst I've been working on this Prototype Cells, it seems to be rather laborious for what I need. Basically all I require is a basic table to allow the user to edit some settings, so there would be:
2 textfields that can be edited, 1 slider, 2 switches
I placed all of this in a Static UITableView however it did not appear - this is due to a restriction on this type of table requiring a UITableViewController. Is there a way around this?
Sorry for the long post - I'm still getting my head around iOS dev but I am enjoying it so far :)
Any help would be greatly appreciated.