Disable numbers and punctuation button on iphone keyboard - iphone

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.

Related

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)

Dot adding at the end of word in UITextView

In my UITextView whenever I have been giving multiple spaces a dot is adding at the end of the word. As I am using that for getting email id, I don't want any dots, How to avoid this?. I have added that UITextView in IB. Do I need to do any changes there?
It's a keyboard setting. Go to settings->general->keyboard and disable "." shortcut. It inserts period if you add two consecutive spaces.
In interface builder, set the keyboard option to E-mail address.

Adding a Custom keyboard to a textfield

I need to figure out how to add a custom keypad to a textfield. What I really need is a decimal point and and add button along with the normal numbers and done button.
Any clues anyone?
Thanks
Have a look here:
http://keith-wood.name/keypad.html
It seems to be quite flexible and allows localization and customization (don't forget that some people use decimal comma instead of point)

Suppressing the language select button 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.

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.