Xcode 4 - custom keyboard

Is there a way to stop the default keyboard and set up a custom keyboard when the user clicks on a TextField?

I’ve already designed so that my buttons are always available as a calculator. It has numbers from 0 to 9, a decimal point, and back space.

+1
source share
2 answers

Starting with iOS 3.2, you can attach any UIViewto yours UITextField, which will be used as a keyboard:

myTextField.inputView = myFakeKeyboard;

You can also attach a toolbar above the keyboard (system or user):

myTextField.inputAccessoryView = myToolbar;

, 0-9, Backspace, UIKeyboardTypeDecimalPad UITextField. iOS 4.1, , , .

+2

viewController :)

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
     return NO; //hide keyboard
}
0

All Articles