How can I add Done button to the number pad in swift? - swift

How can I add Done button to the number pad in swift and then use this button to hide the keyboard?

Unless you are planning on coding a whole keyboard from scratch you can only select existing keyboard types.
There is a really good article http://www.weheartswift.com/make-custom-keyboard-ios-8-using-swift/ which shows how to create a custom keyboard that may help you.

Related

Get small keyboard on iOS8?

So, I got the following image from graphic designer.
On the right is keyboard popping in our application, on the left is keyboard he sees everywhere else on his phone (iPhone 6), apparently. He wants the keyboard on the left to appear in our application too. This looks like standard iOS keyboard, only smaller, but I don't see any option to get it. How do I get it? Or is it just particularly popular custom keyboard/extension? Or maybe it's really easy to do custom keyboard/extension (note, I don't know a thing about custom keyboards/extensions in iOS)?
The keyboard is adjusted when you have inputAccessoryView assigned for active field.
check: https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/InputViews/InputViews.html

Creating Custom Keyboard like emoji

Is it possible to create custom Keyboard in iPhone which can get use by any other application. Similar to the Emoji keyboard. Is it possible to take advantage of the international keyboard feature for the iPhone and create a custom keyboard that can be used over for apps on iPhone?
Any help would be appreciated.
My suggestion is exploit the inputView property of textField. You can create a UIView having buttons on it like the keys in key board, and set action for each buttons. Do actions appropriately for tapping each key.

Display a view when keyboard is visible

Generally when the key board is visible some apps display a view on the top of keyboard with buttons like Done, Auto fill, .. etc
My Question is :
Is this provided by Apple or We have to create and use it.
Thank You in advance
The answer is somewhere in the middle. You do have to create it yourself, but Apple provides support for it. See Programmatically align a toolbar on top of the iPhone keyboard

how to manipulate the keyboard in iphone

I want to manipulate the keyboard in iphone .
basically want to create the action on the keyboard.
thanks advance
You mean, create additional, non-standard button on the keyboard?
Try this

Can keyboard of type UIKeyboardTypeNamePhonePad be made to start in phone mode?

Is there some way to have a keyboard of type UIKeyboardTypeNamePhonePad start in phone number pad mode rather than alphabetic? The keyboard works well for what I need but I'd like it to start in the "other" mode since that is more likely what the user will enter.
I believe that by setting the keyboardType property to UIKeyboardTypeNumbersAndPunctuation, you will default to the numbers and punctuation view, while still having the option of returning to the "ABC" view. Apple's documentation on it: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITextInputTraits_Protocol/Reference/UITextInputTraits.html
Related question: how to show numbers in the default keyboard initially for UITextField
Unfortunately the answer to this question is NO, but there is a workaround.
You can use the UIKeyboardTypeNumberPad and add a custom button (e.g. https://stackoverflow.com/a/4826342/61569) to switch the keyboard to UIKeyboardTypeNamePhonePad. The challenge with this workaround is to support the keyboard styles of different versions of iOS with this custom button
The UIKeyboardTypeNumberPad does not have the 'Done' or the 'ABC' button that will allow you to toggle back and forth between default keyboard and the NumberPad. Now you can choose to go with what #Anthony F suggested but remember you risk the chance of loosing the custom 'Done' button everytime Apple releases newer versions of iOS and move their keyboard window around. To achieve what you want, your best bet will be to set your keyboardType to UIKeyboardTypeNumbersAndPunctuation. This way, you have your keyboard NumberPad loaded up automatically when your view load and have the 'ABC' button also present to be able to toggle between the default keyboard also if you want.
self.myTextfield.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
In the textfield in question, You set the kind of keyboard you would like it to "activate":
[self.myTextfield setKeyboardType:UIKeyboardTypeNumberPad];