Create a custom UIKeyboard In-App - swift

I have a UITextField that only requires specific character input, and I was wondering if it was possible to create a custom keyboard inside an iOS 8 app. Specifically the characters i want are a collection of logical symbols (which have unicode values) and some standard characters like parenthesis etc.
I would ideally like to override/overlay the current buttons on a UIKeyboard but still have the same kind of functionality such as being able to input characters where the cursor position is currently in the text field.
I know that you can create custom keyboards through an app extension but this is not what i want, i just want a keyboard to be used inside the app and no where else. If i am wrong, can i create an app extension keyboard to only be used within the app? that doesn't have to installed via Settings?

You can override the inputView property on your UITextField and return a view containing the keyboard. You must implement the keyboard functionality yourself, there is no way to access anything on the built in keyboard.

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)

iPhone keyboard with weird dot

Where is this dot coming from?:
There is a dot hidden behind keyboard and highlights to blue when pressed (trying to press ?123) to change keyboard mode.
I have noticed it in few placed in my app and in iOS 6 (also with decimal keyboard, one can still see this dot which interferes with comma character).
There is nothing special I am doing with responders (normal UITextView of UITextField fields).
Anyone has idea what could be the cause of it?
Just to exclude popular cause:
I have rootViewController of my key application UIWindow set to my root navigation controller.
It looks like the "old"(before iOS6) way to add a dot or return-key to UIKeyboardTypeNumberPad but with a wrong keyboardType.
Something like in this tutorial: http://www.neoos.ch/blog/37-uikeyboardtypenumberpad-and-the-missing-return-key
Have you ever used this kind of custom keyboard in the past? Or maybe you don't know that you use it. Is there a category of UITextView you have overlooked?
Search through your project for e.g. "#interface UITextField (" to find the category.

adding symbols in iphone keyboard

I've no idea to add special symbols to iphone keyboard like ® © ℠ ™ and many more.Does any one have any idea to add these symbols to the keyboard or any other alternative or adding these symbols in the textView ?
You can't add symbols to a keyboard. You can create a custom keyboard view and set it for the text field using the inputView property. Or you can add a toolbar to the keyboard using the text field's inputAccessoryView property.
Several of these symbols can already be typed directly if the user adds the Emoji keyboard in the Settings app.
You have to use emoji. Or make a custom keyboard.
Create custom keyboard and configure it on your iPhone
Hope this helps!

Customizing Iphone Keyboard

Is there a way to customize the iphone keyboard? Say I want the number pad with a comma button and a period button added to it.
What you are looking for is a custom IME (Input Method) which is not directly supported in iOS (true custom IMEs have been developed, but require jailbreak). You can create a custom view, but just for your application.
Yes, as of iOS 3.2. See this answer. You may not be able to edit the default keyboard, but it's not difficult to reproduce with your own view.

custom number pad

I want to create my own number pad to appear after user focus the textfield, so I have two question about it?
1.I use "Interface Builder to add a textfield in my view and select the "Number Pad" as the default pad for user to input number, so when I click the textfield, the number pad appear automaticlly, how can I stop it appear the number pad? because I want to show my number pad.
2.If I custom a view with number button inside it, how can I detect the event when I click the textfield? and whether after I detect the event I add a subview to show my custom number pad or not?
thanks
If you are creating a custom number pad (I assume this means a view with a grid of buttons), don't bother using a UITextField; there is no easy way to hide the native keyboard and, for all that trouble, there is nothing useful that the text field gives you.
I recommend creating a custom UIControl subclass. You can detect a touch inside the view and show your custom keypad that way. The documentation explains this pretty well.
I have a partial answer but not an ideal one, and I haven't tried this myself. Take a look at the documentation for the UITextFieldDelegate protocol.
You could have your controller set textField.delegate = self, then have it implement textFieldShouldBeginEditing to show your specialized keyboard somehow and then return NO so that it doesn't go into edit mode. When you tell your special keyboard to show itself, pass it a reference to the text field so it knows where to insert characters. The problem is that this probably won't show a cursor and won't let the user move the cursor to insert characters, etc.
So really this a bit ugly, but it may be sufficient. AFAIK there is no good way to do this :(