Remove <Done> Button in Keypad IOS - ios

I have a UITextField and while typing on the normal keyboard there is a button showing on the menu bar above the keyboard. I want to remove the button.
How can I do this?

Go to your Storyboard, select TextField, choose Attributes Inspector.
Then under Return Key you can adjust the type of the button.
As for deleting it, you would may disable it, or if you want it to completely disappear, the easiest (though perhaps not the best) way would be to put an overlay on it (for example a view at appropriate coordinates when the keyboard is visible.

Related

Showing the textfield directly above keyboard when editing

I would like to try and make the text field appear above the keyboard when in editing mode, as shown in this picture, which is in the app Clash of Clans:
Is this achievable through some code or doing stuff in the Interface Builder, or have Supercell (makers of Clash of Clans) done this themselves?
You should look into the inputAccessoryView.
As it says here:
This property is typically used to attach an accessory view to the system-supplied keyboard that is presented for UITextField and UITextView objects.
You add the inputAccessoryView to the individual UITextField and UITextView views you have on your page, meaning that you can have separate inputAccessoryViews for the various textfields if so desired.
So in your case you would need to create your own view containing a UITextField and that checkmark button you have on the right and then add that view as a inputAccessoryView to your textfields and then it should appear right above your keyboard.
Hope that is enough to get you started, now you at least know that you should search for inputAccessoryView to see what can be done :)

Editing keyboard layout in iOS

Is there a possibility to change the button layout on a pre-made ios keyboard?
I would like to add "done" and "punctuation" buttons to numeric keyboard.
There is the Decimal Pad available but in this case i would have to add a custom done button at the top.
Is there a way to move the "delete" button to the right and make it half of its current width, put next to it the "decimal" button and on the former place of "delete" locate "done"?
No, you'll have to implement your own keyboard, if you duplicate the Apple one it will get rejected.
iOS does not support making those types of changes to the keyboard, the only thing you can do is change the text associated with the Done/Enter button by changing the UIReturnKeyType of the associated UITextField.
You can make a View With the buttons you want and set the inputView to the custom view you made ,, and you got a custom keyboard :D
You cannot directly modify the keyboard other than by choosing one of apple's presets. However, it is possible to add additional keys above it using -inputAccessoryView, like WolframAlpha has done in its app.
It looks like you can replace the keyboard entirely, but the accesory view is probably the way to go. See the answer to Adding key to IPad keyboard
EDIT: For an example of how this would look, check out WolframAlpha's blog post on the subject. In your case the accessory view probably won't be quite so tall

iOS TableView Form Navigation

When using Safari and filling out a form, there are three buttons conveniently located at the top of the keyboard labeled Previous, Next, and Done. Is there a keyboard setting that can enable those or do you have to create and program these buttons manually?
I've had some success using this library:
https://github.com/simonbs/BSKeyboardControls
There is no default property of keyboard provided in ios. You need to add toolbar for that. Then you add previous , next or done UIBarButtons in the toolbar.
When keyboard appears toolbar is also displayed above it using some animation or directly same way when it hides/disappears you have to hide the toolbar also using animations or by changing it positioning in view.
Hope it helps you.
XCDFormInputAccessoryView is an accessory which contains the features you needed. It is easy to use. Here is how it looks with keyboard

UITextField not receiving touch event

I have a UITextField in a complex view hierarchy. The text field is in a UIView with label and textfield, say, labelfield.
I can type text there.
There is info button on top right corner. When tap on Info, a modal view controller is loaded. When coming back from the modal view controller, the UITextField becomes unresponsive. I cannt type anything there. The labelfiedl is drawn and shown in the screen.
Interesting thing is that, if I press the ok button, and alert is shown and then the textfield becomes active. Also, on top of the view, there is some text with user interaction enable, if I tap and try to select the text and after that the textfield becomes active. Seems I have to do some other activity/touch on the super view, then the text field becomes active.
Why not on the first case it receive any touch event? I tried with textField.enabled, becomesFirstResponder, setNeedsDisplay in the viewDidApper method, nothing works.
Try the following...
Make sure that the super view to which the text field is added as subview large enough to contain text field(ie make sure that no part of text field is out side the superview. check this for all views).
Make sure that there is no view above textfield.use bringSubViewToFront: method.
Try to enable use interaction after a delay
Hope any of the above fix will solve your problem

How to programmatically change keyboard in iOS?

I would like to programmatically change keyboard when I click a button event.
I used custom keyboard in my app, but I need to change English (US) keyboard in programmatically when I click a button on my custom keyboard.
The only way you can control the keyboard is by showing it (By setting a UITextView/UITextField as a first responder), hiding it (by resigning the editing Easy way to dismiss keyboard?).
The language of the keyboard cannot be changed by your app, since it is a user preference. If you want a custom keyboard of your own, you would have to design it yourself (with UIButtons) and obviously also program it (when it shows, when it hides. I would simply use the keyboard that the user prefers, why do you need to change it? After all, the user is the one that decides which keyboard he uses.
I just got my answer for my own question.
Just put nil into inputView and that will change back into English (US) Keyboard.
You can change to the English (US) keyboard programmatically.
Try this:
textfield.secureTextEntry=YES;
textfield.secureTextEntry=NO;

Resources