Prevent keyboard from resigning after “return” was triggered?
سؤال
my question is kind of straightforward and pretty much the opposite of what most people try to achieve:
How can I prevent the keyboard from disappearing when the 'return' / 'done' button is pressed?
Thanks a lot! Regards, wasabi
المحلول
You need to create a UITextFieldDelegate, and override the textfieldShouldReturn: method. If you return NO from this method, the keyboard will not disappear.
And of course, link up your delegate to the textField
لا تنتمي إلى StackOverflow