Andrea Mario Lufino Andrea Mario Lufino - 4 months ago 16
iOS Question

iOS - UITextView becomeFirstResponder

This is the problem : when MessageComposeViewController has been dismissed, my textView doesn't become the first responder and the keyboard doesn't appear. Why? I put the

[textView becomeFirstResponder]
code in
viewWillAppear
. How can i do??

Answer

I found the solution!!!!!!!! So, in the messageComposeViewController:didFinishWithResult delegate method we call [self dismissModalViewControllerAnimated:YES], but it's wrong! This method must receive NO, not YES! And then recall the [textView becomeFirstResponder] method! I don't know why, but like that the app work perfectly! Thanks of all however! :)