"Stack Text" complication templates should support wrapping text with CLKRelativeDateTextProvider
| Originator: | robotspacer | ||
| Number: | rdar://25755076 | Date Originated: | 15-Apr-2016 04:22 PM |
| Status: | Open | Resolved: | |
| Product: | watchOS | Product Version: | watchOS 2.2 |
| Classification: | Enhancement | Reproducible: | N/A |
Summary:
I'm working on a complication that counts down to a specific date. "3 DAYS" is an example of something that would typically display. I'd like to support all the complication types, but I'm finding this more difficult than it should be in the "Circular" and "Modular Small" complications. If I use a "Simple Text" template, along with CLKRelativeDateTextProvider, then the display ends up saying "3D". If you know the context it's understandable, but it's far from great. I'd prefer to use a "Stack Text" format, with the number ("3") on the first line, and the unit ("DAYS") on the second line. But the only way to do this is by generating the text myself, without using CLKRelativeDateTextProvider. It's not ideal, and in fact the HIG warns to "Never generate relative date or time strings yourself."
Ideally I'd love to see this formatted in a more optimal way, with the number a bit larger than the text. Kind of like the Calendar complication, just with the text on the bottom. Currently this seems to be impossible for a third-party app (unless I created images for every possible display).
Steps to Reproduce:
1. Create a complication template using CLKComplicationTemplateModularSmallStackText or CLKComplicationTemplateCircularSmallStackText.
2. Set line1TextProvider to something like [CLKRelativeDateTextProvider textProviderWithDate:date style:CLKRelativeDateStyleNatural units:NSCalendarUnitDay];
3. Do not set line2TextProvider
Expected Results:
The text should wrap to display it in an ideal way, with the number on one line, and the text on another.
Actual Results:
The text all displays on one line. (Well, technically if line2TextProvider is nil I think it crashes.)
Version:
watchOS 2.2
Notes:
Configuration:
Apple Watch 42mm
Attachments:
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!