Show iPhone keyboard programmatically

mukeshpawar picture mukeshpawar · May 10, 2010 · Viewed 17.7k times · Source

I want show the iphone keyboard. How can I write the code (programmatically) to show the keyboard.

Answer

Douwe Maan picture Douwe Maan · May 10, 2010

As Jacob said, you'll have to run becomeFirstResponder on a UITextView to make it the first responder, the object the user's currently working with. If you do this, the iPhone OS automatically shows the keyboard, cause that's what's needed for working with a UITextView from a user perspective.