As a workaround, you can just store the selected color on a property when the button is pressed and do this:
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
textField.textColor = self.selectedColor;
return YES;
}
UPDATE
As noted in the comments, a better place to put this workaround seems to be in textFieldDidEndEditing
because it handles the case of jumping between fields:
- (void)textFieldDidEndEditing:(UITextField *)textField {
textField.textColor = self.selectedColor;
}