UIFontMetrics.GetScaledFont Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetScaledFont(UIFont) | |
| GetScaledFont(UIFont, NFloat) |
Returns a version of a font that is scaled for the current metrics and constrained to the specified maximum point size. |
| GetScaledFont(UIFont, UITraitCollection) | |
| GetScaledFont(UIFont, NFloat, UITraitCollection) |
Returns a version of a font that is scaled for the current metrics and trait collection, and is constrained to the specified maximum point size. |
GetScaledFont(UIFont)
[Foundation.Export("scaledFontForFont:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual UIKit.UIFont GetScaledFont(UIKit.UIFont font);
[<Foundation.Export("scaledFontForFont:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member GetScaledFont : UIKit.UIFont -> UIKit.UIFont
override this.GetScaledFont : UIKit.UIFont -> UIKit.UIFont
Parameters
- font
- UIFont
Returns
- Attributes
Applies to
GetScaledFont(UIFont, NFloat)
Returns a version of a font that is scaled for the current metrics and constrained to the specified maximum point size.
[Foundation.Export("scaledFontForFont:maximumPointSize:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual UIKit.UIFont GetScaledFont(UIKit.UIFont font, System.Runtime.InteropServices.NFloat maximumPointSize);
[<Foundation.Export("scaledFontForFont:maximumPointSize:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member GetScaledFont : UIKit.UIFont * System.Runtime.InteropServices.NFloat -> UIKit.UIFont
override this.GetScaledFont : UIKit.UIFont * System.Runtime.InteropServices.NFloat -> UIKit.UIFont
Parameters
- font
- UIFont
The font for which to get a scaled version.
- maximumPointSize
- NFloat
The maximum point size of the returned scaled font.
Returns
- Attributes
Applies to
GetScaledFont(UIFont, UITraitCollection)
[Foundation.Export("scaledFontForFont:compatibleWithTraitCollection:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual UIKit.UIFont GetScaledFont(UIKit.UIFont font, UIKit.UITraitCollection? traitCollection);
[<Foundation.Export("scaledFontForFont:compatibleWithTraitCollection:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member GetScaledFont : UIKit.UIFont * UIKit.UITraitCollection -> UIKit.UIFont
override this.GetScaledFont : UIKit.UIFont * UIKit.UITraitCollection -> UIKit.UIFont
Parameters
- font
- UIFont
- traitCollection
- UITraitCollection
Returns
- Attributes
Applies to
GetScaledFont(UIFont, NFloat, UITraitCollection)
Returns a version of a font that is scaled for the current metrics and trait collection, and is constrained to the specified maximum point size.
[Foundation.Export("scaledFontForFont:maximumPointSize:compatibleWithTraitCollection:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual UIKit.UIFont GetScaledFont(UIKit.UIFont font, System.Runtime.InteropServices.NFloat maximumPointSize, UIKit.UITraitCollection? traitCollection);
[<Foundation.Export("scaledFontForFont:maximumPointSize:compatibleWithTraitCollection:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member GetScaledFont : UIKit.UIFont * System.Runtime.InteropServices.NFloat * UIKit.UITraitCollection -> UIKit.UIFont
override this.GetScaledFont : UIKit.UIFont * System.Runtime.InteropServices.NFloat * UIKit.UITraitCollection -> UIKit.UIFont
Parameters
- font
- UIFont
The font for which to get a scaled version.
- maximumPointSize
- NFloat
The maximum point size of the returned scaled font.
- traitCollection
- UITraitCollection
The trait collection for which to get a scaled font.
This parameter can be null.
Returns
- Attributes