UITextField corrupted animation after resignFirstResponder called

Originator:kkormiltsev
Number:rdar://26972716 Date Originated:23-Jun-2016 04:40 PM
Status:Open Resolved:
Product:iOS Product Version:iOS 9.3
Classification: Reproducible:Always
 
Area:
UIKit

Summary:
Text field with empty placeholder has corrupted text field during first animation.
The mandatory condition is to call resignFirstResponder or endEditing: right before animation

Steps to Reproduce:
1. Set up single-view application
2. Add text field and button "Submit" to the view
3. Leave text field's text empty and set some text to placeholder 
4. Set up layout constraints for text field (the top constraint is necessary)
5. Add outlet to top constraint in view controller
6. In IBAction on button's touchUpInside implement the code {
    self.view.endEditing(false)
    self.topLayoutConstraint.constant += 10;
    UIView.animateWithDuration(3.0) { 
        self.view.layoutIfNeeded()
    }
}
7. Run the app
8. Enter some text into text field
9. Press "Submit" button

Expected Results:
The text should stay at the same location

Actual Results:
The text is animated incorrectly

Version:
iOS 9.3.2 [13F69]

Notes:
Probably the real input field of text field hasn't time to update real text label of text field that is being animated after resignFirstResponder called.

Configuration:
iPhone 6

Attachments:
'ios_rdar_bug.mov' and 'rdar_bug.zip' were successfully uploaded.

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!