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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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];
}
回答2:
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
回答3:
Pls go through this
iphone keyboard without textview
Hope this helps