Is there a way to stop the default keyboard and have my custom designed keyboard when user clicks on TextField ?
I already designed my buttons to be always available
Starting with iOS 3.2, you can attach any UIView
to your UITextField
to be used as a keyboard:
myTextField.inputView = myFakeKeyboard;
You can also attach a toolbar above the keyboard (system or custom one) :
myTextField.inputAccessoryView = myToolbar;
By the way, if you need a numeric pad with 0-9, the decimal dot, and Backspace, you can use the UIKeyboardTypeDecimalPad
type for your UITextField. But this one is only available starting from iOS 4.1, and you have to be aware that some locales use a comma instead of a dot as a decimal separator, and this keyboard type shows a comma or a dot regarding of the current locale of the device it's running on.
You need to use this in your viewController and its enough :)
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
return NO; //hide keyboard
}