Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to popup default iphone keyboard on a button click

Hi When we click on a UITextField or UITextView, a default keyboard pops up from the bottom of iphone screen. I want iphone keyboard to appear on a button click, and then handle the keys as typed on keyboard... How can i do that?

like image 851
aqavi_paracha Avatar asked Mar 07 '11 07:03

aqavi_paracha


People also ask

How do you force a keyboard on IOS?

Go to Settings > Accessibility > Keyboards, tap Full Keyboard Access, then turn on Full Keyboard Access.

Can you customize keyboard iPhone?

You can use an alternative keyboard layout that doesn't match the keys on your keyboard. Go to Settings > General > Keyboard > Keyboards. Tap a language at the top of the screen, then select an alternative layout from the list.

What is iPhone character preview?

Another keyboard feature you might not be aware of that can be changed is the functionality that lets you turn off what Apple calls "Character Preview." This is where the character "key" you type enlarges for a second as you type it, popping up on your screen. You can make those pop-ups go away.


2 Answers

Add touchupinside event on button and call becomeFirstResponder method for textview or textfield it will call pop up keyboard. see the following code-

-(IBAction)buttonClicktoModalView:(id)sender{
[textView becomeFirstResponder];
}
like image 117
Mayur Birari Avatar answered Sep 21 '22 02:09

Mayur Birari


I was searching my problem, and came across the following stackoverflow link which answers my question

How to pull up a UIKeyboard without a UITextField or UITextView?

Thank you

like image 20
aqavi_paracha Avatar answered Sep 22 '22 02:09

aqavi_paracha