Right-aligned UITextField does not shrink its text along its baseline
| Originator: | lithium3141 | ||
| Number: | rdar://20384054 | Date Originated: | 01-Apr-2015 10:01 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 8.3 beta 4 (12F61a) |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: UITextField has a convenient property adjustsFontSizeToFitWidth, which causes the field to shrink its text until it either fits in the field or hits the field's minimumFontSize. This property is documented to shrink the field's text along its baseline. However, when the field is right-aligned, the text does not shrink along the baseline; instead, it gradually moves up in the field as it shrinks, despite the baseline (as exposed to Auto Layout) staying in the same place. Steps to Reproduce: 1. Run the attached sample app on an iPhone 4s. Note the placeholder text is aligned with the leading "Name" label. 2. Tap in the field and type "this text is aligned". Note the text is still aligned with the label. 3. Continue typing, adding the phrase "until it has to start shrinking to fit". Expected Results: The text remains baseline-aligned with the leading "Name" label, but shrinks to its minimum font size of 10pts. Actual Results: The text shrinks to its minimum size, but moves up in the field, causing a visual misalignment between the label and the field. Version: iOS 8.3 beta 4 (12F61a) Notes: Configuration: iPhone 4s Simulator Attachments: 'TextFieldFontAdjustmentTest.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!