Returns a version of the specified font that adopts the current font metrics and is constrained to the specified maximum size.
- iOS 11.0+
- Mac Catalyst 13.0+
- tvOS 11.0+
- watchOS 4.0+
The base font to use when applying the style information. Set the size of your font to the standard Dynamic Type size that you use for the corresponding content. Do not specify a font that has already been scaled; doing so results in an exception.
The maximum point size allowed for the font. Use this value to constrain the font to the specified size when your interface cannot accommodate text that is any larger.
A version of the specified font with the appropriate style information applied to it, and scaled appropriately for the specified settings.