I am trying to make a UITextField default to the numbers view of the keyboard on focus, the same as e.g. the "Zip" field in the iPhones contacts/addressbook app. I know the KEYBOARD_* constants of the Ti.UI module, none of those seem to do the trick though, as I do not want to disallow alpha characters
I just want the numbers to be auto focused.
The field will be to describe a value, which in most cases will be a monetary value, and therefore a number, but in some cases it may be something like "2 pieces".
I am working with Titanium SDK 2, iOS 5.1, iOS Simulator on OS X 10.7.
Thanks for any help!
here it is
UIKeyboardTypeNumberPad
read here more about it
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UITextInputTraits_Protocol/Reference/UITextInputTraits.html#//apple_ref/doc/c_ref/UIKeyboardType
It's actually the Keyboard UIKeyboardTypeNumbersAndPunctuation. The reason it wasn't working was that I wrote keyBoardType instead of keyboardType. My bad.
Related
I know this is quiet simple and straight forward to disable autocorrection on iPhone and it worlds pretty much fine, but until now. Surprisingly, suggestion bar appear for text field even I have disabled it from storyboard and even programmatically.
self.textField.autocorrectionType = .no
Done that in sotoryboard as well.
But it does appear on iOS 13, not on previous versions and simulator.
There are many answers already for this one but none is working on iOS 13 so no need to mark the question as duplicate.
Cheers!
If you are using a Storyboard you can disable autocorrection on the attributes inspector (the down arrow icon) under the Text input traits. See the image below for details.
I want to ask why the border of TextField in Blackberry (CodenameOne) always missing when focusing? I am using Native Themes and I have try with theme builder to change the attribute (TextField Background, border etc..) but still missing, does anyone know how to make border on the TextField still appear when you type something in the TextField? Thanks for your help
PS: This does not happen on LWUIT Thorsten Blackberry 1.4
If I recall correctly Thorsten's port doesn't use in place editing for input.
During input the native text field border is used, there is very limited control on the native input.
I have used LWUIT for some years in BlackBerry and yesterday I was facing the same problem. What I did:
Make my own version 1.5 using the things related to TextField and focus from 1.4 (BlackBerryTouchImplementation.java and BlackBerryTouchSupport.java and some little changes).
I did it because I found 2 problems more:
1.The textField were ignoring addDataChangeListener.
2.With constraints PASSWORD | NUMERIC in a TextField, the cursor doesnt move from the first place, I mean, you can enter 8 digit (qwer1234 because it's ignoring the constraints, input mode, input mode order) and the cursor is in the left side of "q".
I know that Shai Almog probably dont like it but let me tell you that I have made test on these BlackBerry devices: 9330, 9550, 9700 and all is ok.
I have been developing a big one app for around 4 months for Spanish language and the quality team have not found big problems.
My iPhone app can't seem to use soft keyboards that doesn't use the US-like QWERTY layout. That is when I set the keyboard to French or Germany, even text fields cannot take in text and an error message No input manager class for input mode error is shown in the console (when debugged under Xcode). Switching to the Emoji keyboard also shows the same problem. But the problem doesn't occur on QWERTY keyboard layouts, like Dutch and Indonesian keyboards.
The all cases are consistent and reproducible both the device (iPhone 4) and the iPhone simulator.
These are error messages in the Xcode's debugger console
When the keyboard is set to French:
No input manager class for input mode: fr_FR
When the keyboard is set to Germany:
No input manager class for input mode: de_DE
When the keyboard is set to Emoji:
No input manager class for input mode: emoji
My app's deployment target is iOS 3.1.3 (I'm still supporting 1st gen devices) but the development environment is Xcode 4.3.1 and iOS 5.1 Simulator. (I don't know whether this is relevant but just in case).
Anybody can help how to fix this?
Thanks in advance.
In my case, this was caused by my swizzling -[NSBundle infoDictionary] and returning a copy of the original dictionary.
I did this to be able to change info dictionary values at runtime (specifically, providing a non-shortened bundle display name to replace the shortened value used on the home screen).
The fix was to not return a copy of the info dictionary, but with some more reflection magic handle each key obtained from the dictionary:
https://github.com/Lyndir/Pearl/blob/master/Pearl/NSBundle%2BPearlMutableInfo.m
Not sure if this answer will help you but I found it from this link: http://code.google.com/p/networkpx/wiki/Creating_Keyboard_Bundles
Anyway here is what I am talking about:
Like UIKeyboardLayoutClass, this field also can be referred using the
same "=xxx" syntax. You can also write the class name of your own
input manager class here.
If this field is missing, no input managers will be used.
Hopefully this will help you!
I am looking for a way to dismiss the number pad in xcode 4.2. I have seen a few suggestions for xcode 3 but none of them seem to work for me. It seems silly that there is no clear/non work around way to dismiss the numberpad of a uitextview. Maybe I am just missing something but I have tried about 10 diff ways with no success. If someone could point me towards a current tutorial or share some super secret tricks that would be great thanks!
Dismissing keyboard on any text input control is simply sending resignFirstResponder message to the control. You don't control the keyboard directly.
And this is completely unrelated to XCode version.
I'm writing an iPhone app which uses a keypad that includes a decimal point. Because this is not standard in the Interface Builder i have assigned this to a text field in the viewDidLoad method like this:
[self.TextField_PrintedRepeat setKeyboardType:UIKeyboardTypeDecimalPad];
When i run this app, tap the text field and expose the keypad, i get this entered into the console log:
Can't find keyplane that supports type
8 for keyboard
iPhone-Portrait-DecimalPad; using
Default
Have you any ideas what this means?
Do i need to worry?
How can i stop this console message?
EDIT: i'm using iOS 4.2.1
What version OS are you running against? the DecimalPad keyboard type was only introduced in 4.1, so if you are planning on allowing prior versions you will get this warning, and it will revert to the normal keyboard type. If you don't want this happening, check for the existence of UIKeyboardTypeDecimalPad before doing the call.