I have a WKInterfaceLabel
in an Apple Watch app running watchOS 5. I have set its attributed string to one that contains a bold font attribute applied to a substring. The boldface shows correctly when the app is run. However, if you change the Dynamic Type's size in the Watch app on the iPhone, the text size on the watch changes, but the boldface disappears.
I expect that watchOS is just setting the font of the WKInterfaceLabel
which is wiping out the boldface. Other attributes such as foreground color are preserved.
I noticed NSNotification.Name.didChangeNotification
is not supported in WatchKit so I can't intercept this size change.
How do you handle Dynamic Type changes in WatchKit? Is there a way to preserve font attributes within an attributed string when the text size is changed by the user?