Is there a way to programmatically enable or disable the Return Key on the UIKeyboard
? The closest I could find is enablesReturnKeyAutomatically
, but that only will tell whether to disable it at all.
Ios – How to disable/enable the return key in a UITextField
cocoa-touchiosobjective-cxcode
Related Question
- Objective-c – How to dismiss keyboard for UITextView with return key
- Objective-c – How to print out the method name and line number and conditionally disable NSLog
- Ios – How to make a UITextField move up when the keyboard is present – on starting to edit
- Ios – How to check if a string contains another string in Objective-C
- Ios – Xcode – How to fix ‘NSUnknownKeyException’, reason: … this class is not key value coding-compliant for the key X” error
- Ios – Passing data between view controllers
- Objective-c – How to disable ARC for a single file in a project
- Ios – Xcode error “Could not find Developer Disk Image”
Best Solution
Maybe the following code segment helps:
This is publicly available in iPhone SDK in UITextInputTraits. Using this, return key will be disabled when no input text is available within text field.