UITextField text disappears on every other keystroke

Originator:kevinchen2003
Number:rdar://17726839 Date Originated:18-Jul-2014 09:45 AM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 7+
Classification:Serious Bug Reproducible:Always
 
Summary:
When a UITextField is in a view that is presented in a modal navigation controller, and the UITextField's becomeFirstResponder: method is called in viewDidLoad: or viewWillAppear:, the UITextField text will disappear on every other keystroke.

Steps to Reproduce:
1. Create blank iOS project
2. Add a view with a UIButton
3. Add a navigation controller. Change the root view to a plain UIView and put a text field in the view.
4. segue the UIButton from step #2 to the navigation controller with segue type "modal"
5. Set the type of the text field view to MyViewController
6. Create an outlet for the text field
7. In MyViewController viewDidLoad, call [myTextField becomeFirstResponder]
8. Say goodbye to your friends and family, because this is the last time they will see you sane.
9. Run the app and tap the button. Type something into the text field

Expected Results:
Letters appear in the box when you type

Actual Results:
The text in the box disappears every other keystroke you type. It actually is not gone; it just moves about 200pt downward, beyond the bounds of the text field. If there are corrections suggested for the text, they will float ~200pt below the text field. It's not even noon yet and I need a drink.

Version:
iOS 7+

Notes:
Video:
http://stackoverflow.com/questions/19352663/uitextfield-text-disappears-on-every-other-keystroke

Very detailed description:
http://stackoverflow.com/questions/22494543/disappearing-uitextfield-text

Configuration:
All iPhones and iPhone simulators

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!