You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Zev/Rightpointers! Hope you're doing well. I'm seeing some weird behavior with Dynamic Type and application.enableAdaptiveContentSizeMonitor() I'm wondering if anyone has context on.
I have two StringStyles: one just uses the system body font (UIFont.preferredFont(for: .body)). The other uses a font in the bundle (Lato), and I create a scaled font like this:
In the demo video attached, I have 4 labels: applying both .adapt(body) and .adapt(control) to each of these styles. I'm also calling application.enableAdaptiveContentSizeMonitor(), so I'm hoping to see the labels responding to changes to Dynamic Type when I return to the app. Weirdly, what I'm seeing is that all 4 labels do adjust their size somewhat in the right direction (larger or smaller), but I still need to leave and recreate the view to get the correct dynamic size. In the video attached, the labels are initially the correct (small) size, and when I move the Dynamic Type slider to the large end, the labels get bigger, but not as big as expected. Once I leave the view and push to a new view, they're the correct size again. I see the same behavior regardless of whichever 2 points on the Dynamic Type slider I use. Any idea what might be causing this weird behavior?
dynamic-type-bug.mov
The text was updated successfully, but these errors were encountered:
Weird. Nothing immediately jumps out. Keep in mind that BonMot's dynamic type stuff was created before the more recent UIKit APIs for dynamic type metrics, so in addition to debugging this, it's possible that there's a more modern rethink that we could do.
In terms of debugging, you can't go wrong subclassing UILabel and observing its font and attributedText properties to see if anything interesting pops up.
Hey Zev/Rightpointers! Hope you're doing well. I'm seeing some weird behavior with Dynamic Type and
application.enableAdaptiveContentSizeMonitor()
I'm wondering if anyone has context on.I have two
StringStyle
s: one just uses the system body font (UIFont.preferredFont(for: .body)
). The other uses a font in the bundle (Lato), and I create a scaled font like this:In the demo video attached, I have 4 labels: applying both
.adapt(body)
and.adapt(control)
to each of these styles. I'm also callingapplication.enableAdaptiveContentSizeMonitor()
, so I'm hoping to see the labels responding to changes to Dynamic Type when I return to the app. Weirdly, what I'm seeing is that all 4 labels do adjust their size somewhat in the right direction (larger or smaller), but I still need to leave and recreate the view to get the correct dynamic size. In the video attached, the labels are initially the correct (small) size, and when I move the Dynamic Type slider to the large end, the labels get bigger, but not as big as expected. Once I leave the view and push to a new view, they're the correct size again. I see the same behavior regardless of whichever 2 points on the Dynamic Type slider I use. Any idea what might be causing this weird behavior?dynamic-type-bug.mov
The text was updated successfully, but these errors were encountered: