In general its also preferred that you look at the traitCollection of the most relevant view for this information – there are contexts for which the content size category may not match the global value (and there is API on UIView to restrict the overall range that you can apply as well). This also means you can just use traitCollectionDidChange as your notification.
> On Oct 17, 2021, at 12:50 PM, Matt Jacobson via Cocoa-dev > <cocoa-dev@lists.apple.com> wrote: > > Hey Alex, > >> On Oct 17, 2021, at 2:51 PM, Alex Zavatone via Cocoa-dev >> <cocoa-dev@lists.apple.com> wrote: >> >> We’ve got a situation where we need to check the current accessibility font >> size enum and apply custom settings to some attributed fonts. I’ve seen >> that there is a way to check the current dynamic text size using SwiftUI, >> but I haven’t seen how to do it using UIKit. >> >> I’ve seen that UIContentSizeCategory exists, but no idea how to see what the >> current value is. >> >> Is anyone aware how to do this? TIA. > > Have you tried this? > > [UIApp preferredContentSizeCategory] > > (Don’t forget to observe changes: UIContentSizeCategoryDidChangeNotification.) > > Matt > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com > > This email sent to david.dun...@apple.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com