Scales an arbitrary layout value based on the current Dynamic Type settings and the specified traits.
- iOS 11.0+
- Mac Catalyst 13.0+
- tvOS 11.0+
The height value that you want to scale. Specify the height of the object that contains the text (at the standard Dynamic Type size) that you want to display.
The trait collection to use when determining compatibility. The returned value is appropriate for use in an interface that adopts the specified traits.
A layout height that is scaled appropriately to accommodate the text that you want to display.
Use this method to scale the height of visual elements containing text. For example, if you define a button with text that can scale based on Dynamic Type, you would use this method to obtain an appropriately scaled height for your button's background content.