62

How can I change the standard text of the "Return" button to something else?

I want it to be "Add".

jscs
  • 62,161
  • 12
  • 145
  • 186
Ilya Suzdalnitski
  • 49,863
  • 47
  • 128
  • 166

3 Answers3

130

Unfortunately, you can change "Return" into only one of these predefined labels with the returnKeyType property:

  • Return (default)
  • Go
  • Google
  • Join
  • Next
  • Route
  • Search
  • Send
  • Yahoo
  • Done
  • Emergency Call
  • Continue (as of iOS 9)

So maybe you should choose "Next" if a data entry kind of activity is what you're after.

More information here.

macbirdie
  • 15,585
  • 6
  • 44
  • 52
6

You can use this simple way: [textField setReturnKeyType:UIReturnKeyNext]; or [textField setReturnKeyType:UIReturnKeyGo]; instead of "Add" button.

Other, you create a programmatically keyboard with buttons which you want.

Sourabh Kumar Sharma
  • 2,756
  • 3
  • 20
  • 31
AmyNguyen
  • 397
  • 5
  • 10
1

iOS 9 now supports Send button. This is the following swift code

self.liveChatMessage.returnKeyType = .Send

Objective C:

[self.liveChatMessage setReturnKeyType: UIReturnKeyTypeSend];
Jessedc
  • 11,538
  • 3
  • 45
  • 63
cmario
  • 557
  • 6
  • 21