0

If user sends SMS in my app using MFMessageComposeViewController, cursors of UITextFields are gone.

Is there a way to prevent this or bring the cursor back at least?

Behlül
  • 3,412
  • 2
  • 29
  • 46
  • So, after you send the message, if a user clicks on a UITextField, no cursor, no keyboard - the textfields are essentially inactive? How about buttons? Are you doing all your messaging related to the MFMessageComposeViewController in the mainThread? – David H Aug 14 '12 at 12:01
  • I see keyboard, I can type as well. But cursor becomes invisible. And MFMessageComposeViewController is presented as a modal view cont. – Behlül Aug 14 '12 at 12:11
  • In virtually all cases like this, there is corruption due to messaging the UI on other threads than the mainThread. Also make sure you properly release the message controller - see this link http://stackoverflow.com/a/11869861/96716 – David H Aug 14 '12 at 13:21

2 Answers2

0

It was related to showing a UIAlertView on finished delegate method of MFMessageComposeViewController. Although I was showing UIAlertView after dismissing the modal view, it was causing that bug.

Removing UIAlertView fixed the issue. Now I'm thinking of designing my own alert popup and showing it instead of the default UIAlertView.

Behlül
  • 3,412
  • 2
  • 29
  • 46
0

I had a similar problem. There was a login screen that shows a UIAlertView when login fails. After dismissing the alert view cursor was gone from user name and password fields. I fixed the issue by recreating an identical view controller and view hierarchy on the storyboard.

The storyboard was originally created in Xcode 4 and later converted to Xcode 5. Perhaps Xcode messed up something.

Pasi Heikkinen
  • 981
  • 10
  • 11