How to show a keyboard via press a NSButton?

ios, nsbutton, objective-c

Solution

You need to add an `UITextField` to your view and call then `[myTextfield becomeFirstResponder];` Its possible to set the hidden attrribute from `UITextField` to `YES` - so the user will never see the textfield. After Keyboard input is finished you can remove the `UITextField` with `removeFromSuperview`.

Maybe a little bit dirty, but thats the solution I used often. I wonder if the SDK provide another possibility.

Problem

I only know few ways to show a keyboard on iOS touch textfield,search bar,textview..... Is it can via touch a button to show keyboard ??? I wish I can use this way to set a button tittle if the button is no tittle or can rename it. Thank you guys~

Original source