Holding up your iPhone keyboard by pressing a button?

How can I open the iphone keyboard by pressing a button - I have not created any text fields. My intention is to have labels containing one character.

Other people ask about it, and they answered it, but it was many years ago, and I did not understand that people had in mind the answers.

Thanks for any help in advance.

+4
source share
4 answers

Only in this way can you do this through a hidden UITextField and set textField to becomeFirstResponder

you can hide the text field in your code so that its textfield.hidden=YES; or you can hide the text box from the nib file by going to the attribute inspector and check the Hidden property

You can take a look at this UIKeyInput- Display keyboard on iPhone without UITextField or UITextView , I have not tried this myself

+2
source

You can add a hidden UITextFeild as tempTF also at the click of a button. call becomeFirstResponder this textFeild :

 [self.tempTF becomeFirstResponder]; 

To hide textField:

 UITextField *tempTF = [[UITextField alloc] init]; tempTF.hidden = YES 

or check the "Hidden interface"

0
source

Attach a button to the touchUpInside event and call startFirstResponder on a textView or textfield :

Here is an example (to open it when you click on the text view):

 -(IBAction)buttonClicked:(id)sender{ [textView becomeFirstResponder]; } 
0
source
 -(void)ButtonClicked { [textFld becomeFirstResponder]; [textView becomeFirstResponder]; } 

use this method

0
source

All Articles