How do I give a UITextView focus programatically?

By : Meroon

So I want to bring in a modal view controller that has a UITextView in it and I want the keyboard to automatically popup and the UITextView have focus.

I found a way to accomplish this by doing the following:

textView.editable = YES;
textView.editable = NO;

This just seems hacky to me, is there another way?

By : Meroon

[textView becomeFirstResponder];

This video can help you solving your question :)
By: admin