Setting a title for UIPreviewAction with variantFittingPresentationWidth results in using the wrong string
Originator: | fbe | ||
Number: | rdar://41193537 | Date Originated: | 17-Juni-2018 09:58 AM |
Status: | Open | Resolved: | |
Product: | iOS + SDK | Product Version: | iOS 11 |
Classification: | UI/Usability | Reproducible: | Always |
Summary: When setting a title in a UIPreviewAction with a String using `variantFittingPresentationWidth(_:)`, the String is read out from the `Localizable.stringsdict` correctly but it is using the shorter variant with a text alignment to left when displaying the String in the UIViewControllerPreviewing on simulator. Steps to Reproduce: 1. Define a String with two values with `NSStringVariableWidthRuleType` in `Localizable.stringsdict` for the keys `1` and `30` 2. Define a string using `NSLocalizedString(key:comment)` casted to NSString 3. Create a new variable with calling `variantFittingPresentationWidth(30)` on the localized String. 4. Set the title in a UIPreviewAction with the new variable Expected Results: UIPreviewAction.title uses the long string defined in Localizable.stringsdict Actual Results: UIPreviewAction.title displays the short string defined in Localizable.stringsdict Version: iOS 11 Notes:
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!