Returns the font object used for standard interface items in the specified size and weight.
- iOS 8.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The size (in points) to which the font is scaled. This value must be greater than 0.0.
The weight of the font, specified as a font weight constant. For a list of possible values, see "Font Weights” in
UIFont. Avoid passing an arbitrary floating-point number for
weight, because a font might not include a variant for every weight.
A font object of the specified size and weight.
Instead of using this method to get a font, it’s often more appropriate to use
preferred because that method respects the user’s selected content size category.