How to display enter key in iOS keypad for textView (objective c)

930 Views Asked by At

I want to display enter key on keyboard instead of return key. Because i want user to type in a texView. We know that there is no keypad return in textView. Generally, i want to replace the "return" key with "enter". Normally in textView, the return key works as enter. So i need the return key labeled as enter. Is it possible?

3

There are 3 best solutions below

3
On BEST ANSWER

Try using the returnKeyType attribute:

UITextField *textField = [[UITextField alloc] init];
textField.returnKeyType = UIReturnKeyTypeDone

Here are the available options:

typedef NS_ENUM(NSInteger, UIReturnKeyType) {
    UIReturnKeyDefault,
    UIReturnKeyGo,
    UIReturnKeyGoogle,
    UIReturnKeyJoin,
    UIReturnKeyNext,
    UIReturnKeyRoute,
    UIReturnKeySearch,
    UIReturnKeySend,
    UIReturnKeyYahoo,
    UIReturnKeyDone,
    UIReturnKeyEmergencyCall,
    UIReturnKeyContinue NS_ENUM_AVAILABLE_IOS(9_0),
};
0
On

You can't set Enter But You can set a numbers of default key for keyboard instead of return from storyboard.In you scenario Done will be nice.

see in image

0
On

You cannot set custom text for the return key on iOS. There are a number of options but those are the only ones.