After the application user has set the "Text Size Property" in Settings, the application will receive a notification via UIApplication.Notifications.ObserveContentSizeCategoryChanged. It is the application developer's responsibility, at that point, to invalidate the layout in all view elements that implement Dynamic Type. The simplest way to do that is to have a method that re-sets the font in all components that support Dynamic Type:
C# Example
UIApplication.Notifications.ObserveContentSizeCategoryChanged((s,e) => { SetDynamicTypeFonts(); }); //Call this when initializing, and also in response to ObserveContentSizeCategoryChanged notifications private void SetDynamicTypeFonts() { headlineLabel.Font = UIFont.PreferredFontForTextStyle(UIFontTextStyle.Headline); bodyText.Font = UIFont.PreferredFontForTextStyle(UIFontTextStyle.Body); //...etc... }
Member Name | Description |
---|---|
ExtraExtraExtraLarge | A font that's larger than ExtraExtraLarge. |
ExtraExtraLarge | A font that's larger than ExtraLarge. |
ExtraLarge | An extra-large font. |
ExtraSmall | Quite small. |
Large | A large font. |
Medium | A medium-sized font. |
Small | A small font. |