tvOS 11.0 regression: UITextField font size does not revert to the default value when cleared

Originator:igeek1
Number:rdar://33742507 Date Originated:05-Aug-2017 09:02 PM
Status:Open Resolved:
Product:tvOS + SDK Product Version:tvOS 11.0 (15J5333e)
Classification:Other Bug Reproducible:Always
 
Summary:
When UITextField’s font property is set to nil, it immediately reverts to its default value. On tvOS 11, it reverts to a value that is half its default value.

Xcode 9.0 (9M189t) on macOS 10.12.6 (16G29)

Steps to Reproduce:
1. Create a UITextField.
2. Inspect its font and observe that it has a size of 38 points.
3. Set the text field’s font to something besides the default.
4. Inspect the text field and confirm that its font is the correct new value.
5. Set the text field’s font back to nil.
6. Inspect the text field’s font value. Even though it was just set to nil, it now has a default value. This is expected behavior.
7. Inspect the new font’s point size.

Expected Results:
The point size is the same value as the starting value: 38 points.

Actual Results:
The point size is now 17 points - half the original default value.

Version:
tvOS 11.0 (15J5333e)

Notes:
You can see this all in action in the attached Xcode project. Run the unit tests 4 times with the following settings:

Scheme: FontSizer-tvOS, tvOS 11.0
Scheme: FontSizer-tvOS, tvOS 10.2 (the one I happened to be testing on).
Scheme: FontSizer-iOS, iOS 11.0
Scheme: FontSizer-iOS, iOS 10.0 (again, the one I happened to be testing on).

You will notice that the only time the test fails is on tvOS 11.0.

Attached project also posted at https://cl.ly/ls9j

Comments

Posted by me - November 18 2017, 4:05 PM

Verified fixed in tvOS 11.2.

Apple Developer Relations - November 8 2017, 5:09 PM

Please verify this issue with the tvOS 11.2 beta and update your bug report at https://bugreport.apple.com/ with your results. tvOS 11.2 beta 2 (15K5090c) https://developer.apple.com/download/ Posted Date: Nov 6th, 2017 If the issue persists, please attach a new sysdiagnose captured in the latest build and attach it to the bug report. tvOS sysdiagnose Instructions: https://developer.apple.com/services-account/download?path=/iOS/tvOS_Logs/sysdiagnose_Logging_Instructions.pdf


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!