I have a table view that displays a list that I want the user to be able to edit. In order to save space, and to make my view easier on the eyes, I have created a custom toolbar that conforms to the UIKeyInput protocol so that I can pull up a keyboard without having to use any text fields. So far so good. I have a mutable string that is handling the input from the keyboard:
- (void)insertText:(NSString *)text {
if (!itemForList) {
itemForList = [NSMutableString string];
}
[itemForList appendString:text];
}
The thing that I can't figure out how to do is detect when the user presses return. This is important because I need to be able to take the string that the user typed in and add it to the mutable array that the table view is displaying from, and then reset the string to handle new input. I would greatly appreciate any help in this field. Thanks guys.