Suppressing the language select button iPhone - iphone

I'm working on an application now that contains an account register section. One field with secureTextEntry = NO (for registering only). The idea is this make registration faster and hopefully increases the number of signups. It's simple enough for me to just place a regular UITextField but if the user has any additional language keyboards then it's possible for the user to enter non-password friendly characters. Unlike in when secureTextEntry = YES.
I know I can do
textField.keyboardType = UIKeyboardTypeASCIICapable
to get the text field to display the ASCII keyboard first, but the user will still have the keyboard switch button which will allow them to get to undesirable characters.
Is there a simple method for suppressing the international button or forcing ASCII only keyboard with no international button?
[EDIT]
Another perhaps better option might be to suppress multi byte keyboards or even to display the text in the case that secureTextEntry = YES any ideas here?
[EDIT AGAIN]
I've decided it's a really bad idea to suppress the international button as non-multibyte characters should all be allowed.

Have a look at -(BOOL) textField:(UITextField*)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString*)textEntered.
If your users enters something that your password doesn't like then remove it. Just make sure they understand that a particular letter is not accepted. Otherwise users will look at the keyboard but not at the screen and assume because they have touched the button the character is entered into the password.
This might be easier than re-designing a whole keyboard.

Related

Different keyboards for editing different text fields

I have three editable text fields in my app. When user enters text in the first text field, the English keyboard should show up, in the second - Spanish, in third - Chinese, etc. Everything else in the app should stay in English.
If possible, the languages could be selected dynamically by the user from the list of available locales (I don't need help with selecting the language):
https://docs.flutter.io/flutter/flutter_localizations/GlobalMaterialLocalizations-class.html
The closest that I found to what I want is described here: https://medium.com/saugo360/managing-locale-in-flutter-7693a9d4d6ac
but I wonder if there is a way to make it less intrusive: like making it a property of the TextEditingController
This shouldn't be done by the application.
Keyboards are installed by user and user knows how to switch between them.

Can I customize keyboard layout for apple tv?

I want to have a custom keyboard (without full-screen keyboard) instead of default keyboard in my apple tv app?
If possible, what are the approaches should I follow?
Any suggestions appreciated.
The SearchTemplate is the only keyboard available for TVML, and there isn't a whole lot you can do with it.
But with TVML, there's 2 ways you can do redo the keyboard
1) using section with lockup and some TVJS, to create your own keyboard. Each lockup can be a character and onclick, can trigger tvjs to record and display the character into a label. Should be relative easy to implement, specially if you are only dealing with a small set of characters, like numbers.
2) custom element, as described in the docs, you can use native code to define any element and.. you can make your own keyboard that way.
=-=-=-=-=-=
Update
Somehow I missed the form template. This template included a keyboard too. And, you can *customize this keyboard!
The textField element provides a field for users to enter text, which also accepts the keyboardType attribute for selecting the type of keyboard to display. It even has support for number and URL inputs.
(*basic customization lol)

Disable numbers and punctuation button on iphone keyboard

I have a UITextField that brings up the keyboard. I just want the user to input alphabets and not numbers or punctuation marks. How do I disable the numbers and punctuation key on the default keyboard that pops up.
Thanks.
David
Looking like you used the Default Keyboard....instead you can try to use:
yourTextField.keyboardType = UIKeyboardTypeAlphabet; This might solve your problem.
& if this doesn't solve your problem other way, is:
----> You need to create the Custom Keypad as per your requirement.

Toggling UITextAutoCorrectionType WHEN a UITextField is being edited

I want to turn auto-correction on/off based on the content in the text field.
For example, if the user is typing a phrase like "Machine tools" I want auto-correction to be on (for the rest of the words she's gonna type) but if I sense the beginnings of - say - a web address like "www.mach.." I want to turn auto-correction off.
I tried doing this on receiving the UITextFieldTextDidChangeNotification, by toggling autoCorrectionType on the textfield based on the content typed. While the actual value of this property on the text field changes (verified this with an NSLog) the actual correction behaviour does not get affected. So if auto-correction was on at the beginning of the editing session, it continues to be so even AFTER I have set the text field to UITextAutoCorrectionTypeNo. So "www.foogle..." gets corrected to "www.google.." which may not always be desirable in my book.
So has anyone found a way to enable/disable auto-correction on the fly (when editing) in a text field?
Thanks.
UITextView has to reload something internally which it doesn't do automatically, so we have to trigger it from the outside. A way I found is to resign and become first responder again:
[textView resignFirstResponder];
// UITextAutoCorrectionType change
[textView becomeFirstResponder];
This works. Remember to restore the selected range.
Raphael
I was able to run [textField reloadInputViews] after setting the autocorrection type.
Be aware that this resets the state of the keyboard. If you were viewing symbols (instead of letters), after calling reloadInputViews the keyboard will be reset to letter.

iPhone keyboard layout for negative numbers?

My users need to enter latitude and longitude, and of course I need to verify that the values entered are legitimate lat/long value. I'd like to have a keyboard layout that does some of this for me (eliminating alphabetic characters, punctuation, etc, and leaving only the numbers and +/-). The number pad keyboard doesn't seem to do it (missing +/-) and neither do any other keyboard layouts that come with the SDK. Does anyone know if there is a way to provide that capability without doing my own keyboard IME and jailbreaking the phone?
Thanks!
I know this is answer is way late, but this topic was still relevant to me. Therefore I have hope the following will help someone who comes across this page.
Bryan S. Gruver posted a full Xcode project that lambdabunny could modify ever so slightly in order to achieve their aim. You can find it here:
http://brygruver.squarespace.com/blog/2009/10/1/creating-a-custom-number-pad.html
Update
The Squarespace link is now broken. Another option is:
https://github.com/lnafziger/Numberpad
How about placing a "+/-" button next to your UITextView that would switch the sign of the entered text? Or a "+" button that appears to the left of it that switches the button label from "+" to "-" each time you tap it.
You don't have to jailbreak.
If you create a view to simulate the keyboard you're still following the SDK rules.