Right now I am using learning to program for the iphone and I am using a sample application that has the standard numeric keypad. I need to enter decimal points too but the numeric keypad does not have any. The SDK 4.1 supports this feature but I cannot set the keyboard type to be UIKeyboardTypeDecimalPad, at least I do not see the option in Interface Builder. Can this be done from the Interface Builder? if not then where can add this in code?
thank you.
You need to add this in your code. Interface builder doesn't seem to use it yet. You should be able to add it in for your UITextField in the viewDidLoad method of your controller. Of course, your text field will need to be wired to an IBOutlet.
- (void)viewDidLoad
{
[super viewDidLoad];
myTextField.keyboardType=UIKeyboardTypeDecimalPad;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With