5

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?

aqavi_paracha
  • 1,131
  • 2
  • 17
  • 38

3 Answers3

5

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];
}
Mayur Birari
  • 5,837
  • 8
  • 34
  • 61
3

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

Community
  • 1
  • 1
aqavi_paracha
  • 1,131
  • 2
  • 17
  • 38
1

Pls go through this

iphone keyboard without textview

Hope this helps

Community
  • 1
  • 1
visakh7
  • 26,380
  • 8
  • 55
  • 69