Grey out return key programmatically
问题 I am looking to enable the return key of a UITextField keyboard if (and only if) the user inputs a valid email address. I have tried a solution that dates back from 2009 which uses the private method setReturnKeyEnabled . Unfortunately, this method does not seem to exist anymore: No known instance method for selector 'setReturnKeyEnabled:' How can I programmatically enable and disable the return key of a keyboard? 回答1: All the other solutions do not answer the question. OP wants to "gray" out