Reputation: 1397
I want to add a custom key to my Keyboard. (a .com key) When user begins to type in email text field this keybord with the key should be appeared. I used keyboard type email. But it not gives that key. How I can add this key to my keyboard.
Thanks
Upvotes: 6
Views: 15592
Reputation: 11005
You can't change default keyboard of Apple.
But you can select with keyboard type for UITextField
or UITextView
by set some properties in UITextInputTraits
protocol. With email, set to:
[textView setKeyboardType:UIKeyboardTypeEmailAddress];
You can use inputAccessoryView to add some custom keys, refer: dmforminputaccessoryview
Last option is create new Keyboard (UIView subclass) and set it to inputView of UITextView
or UITextFied
:
Custom-iOS-Keyboards
Upvotes: 0
Reputation: 5226
The .com key is added when the URL type keyboard is used: KeyboardManagement
You might as well make use of the inputAccessoryView of the text field, add a UIToolbar to it, and in the toolbar you can add a few buttons you want, including custom .com button.
Upvotes: 3
Reputation: 9913
There is no way you could change default keyboard
. and If you anyhow modify it(using private methods) apple will reject your app because it is against apple guidelines.
So the only solution to your problem is create a custom keyboard and then use it. There are few custom keyboards you can use them also :
Hope it helps you.
Upvotes: 1
Reputation: 2919
Here is the tutorial that helps you add custom buttons into ios keyboard!
adding-custom-buttons-to-ios-keyboard
Upvotes: 3
Reputation: 29084
Have a look at this: custom keyboard
Integrate one of them into your project and customise it accordingly. Hope it helps to start...
Upvotes: 1