Adding smilies in Custom Keyboard - iphone

I want to add the smilies in the keyboard for text to add the comment like :P and <3 and if I did so to create the custom keyboard, will Apple reject my application?

You can add simple UIView with buttons above the keyboard, and show this view when keyboard appears. By pressing buttons just insert corresponding smiles to text.

if you are using something like UITextField, you can simply create a UIView with buttons like ":P",and assign this view to UITextField's inputAccessoryView property.

Related

How to create custom keyboard throughout iPhone

Is it possible to create a custom keyboard for iPhone or iPad in iOS 5 or later?
My thinking is I have to create my own keyboard with some icons. And It will popup custom keyboard while beginning the text in textfield.
Is It possible?
Thanks In advance.
You can make a custom input view, but within your application only (i.e. you cannot replace the keyboard across the entire device): https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/InputViews/InputViews.html#//apple_ref/doc/uid/TP40009542-CH12-SW2
Essentially you just assign your custom view to the inputView property of a UITextView (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextField_Class/Reference/UITextField.html#//apple_ref/occ/instp/UITextField/inputView) and your custom view will be shown when your input becomes the first responder.

How to add keyboard in action sheet

Is it possible add keyboard in action sheet?
If yes, how can I do? ... I would like to disable the background.
Thanks, Luigi.
I think UIKeyBoard can not be added in ActionSheet but you achieve your goal but handling keyboard notifications...add the Keyboard will appear and will disappear notifications in your controller...
on keyboard will appear add a subview of frame same as the parent view frame..and set its alpha 0.5...it will look like An ActionSheet is appearing and the background will automatically be disabled and on keyboard disappear remove that view from superview...you can add tap Gesture in the view you are adding..Hope so it will be answer of your question.
You can add different controls to action sheets, like pickers and text views. However, as mentioned you can't add a keyboard.
If you want to customize what is shown when the keyboard is shown, you can slide controls with the keyboard, to make it look like they are part of the keyboard.
Alternatively you could create your own keyboard using buttons etc.

how to get the cursor in UITextView without keyboard?

I am developing a program in which I have UITextView in that I need a cursor without the key board.In this cursor is show only with the keyboard if I hide the keyboard cursor will also get hide.How can I get the cursor without the key board ?
The cursor is displayed as long as you UITextView is being edited.
Thus, you can change its inputView view to some other view if you need to, and it will be displayed instead of the keyboard.
See http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIResponder_Class/Reference/Reference.html
With this method you can add your custom inputView, a UIPickerView for example, or as you say you want you can add a minimalist hidden UIView.
If you want to restrict UITextField content, you still need to implement UITextFieldDelegate, as the user can still paste content to your text field!

Textfield in the keyboard

How do you make a keyboard have a textfield inside like the messages app ?
never tried but you can try this -
You can programmatically
set a tool bar.
set a textfield.
set the tool bar as the inputAccessoryView of the textfield.
make the textfield the first responder.
It depends what you're trying to do with it. You could simply create a view that looks like the keyboard section and show it right above the keyboard. If you're trying to actually send SMSs/emails, look up the MessageUI documentation.

Remove keyboard or place Picker View on TOP of keyboard

Anyone has any idea how one can achieve the same look as when you press on the "From:" in the Mail iphone app when you have more than one user account.
I'd like to remove my keyboard, but WITHOUT animating it. Rather just disappear and instead of it have a UIPickerView appear.
Thanks much!
Since iOS 3.2 you can set the inputView property of a UITextField to a custom view. This view is then shown instead of the keyboard as input for that view.
There's no way to achieve this before iOS 3.2 I know.
UITextField Class Reference