UITextField loses focus after presenting in a UIViewController inside UIPageViewController with animation

Originator:nskboy
Number:rdar://23897240 Date Originated:15-Dec-2015 11:16 AM
Status:Open Resolved:
Product:iOS Product Version:9.2
Classification:Other Bug Reproducible:Always
 
Summary:
In my application I have UINavigationController with UIPageViewController as the only view controller in the navigation stack. I use -[UIPageViewController setViewControllers:direction:animated:completion:] when I need to navigate forward. One of my view controller has UITextField that should have focus after presenting it on screen. I use standard way of doing this: -[UITextField becomeFirstResponder]. However it doesn't work on Xcode 7.2 with iOS 9.2. I see blue cursor when view controller appears on screen but it disappears immediately.

Steps to Reproduce:
1. Open attached Xcode project
2. Run it in iPhone Simulator with iOS 9.2
3. Tap on "Proceed to second screen" button

Expected Results:
Text field with "Subject under test" placeholder should have focus

Actual Results:
Text filed with "Subject under test" placeholder doesn't have focus

Version:
9.2 (13C75)

Notes:
To workaround this bug you have to use delayed call to -[UITextField becomeFirstResponder].

Configuration:
Any iOS Simulator with iOS 9.x shipped with Xcode 7.2 (7C68)

Attachments:
'TextEditing.zip' was 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!