Edit

Share via


UIFontDescriptor.GetPreferredDescriptorForTextStyle Method

Definition

Overloads

GetPreferredDescriptorForTextStyle(NSString)

Weakly-typed version of an API used to retrieve the user's desired font size.

GetPreferredDescriptorForTextStyle(UIFontTextStyle)

Weakly-typed version of an API used to retrieve the user's desired font size.

GetPreferredDescriptorForTextStyle(NSString, UITraitCollection)

Returns the preferred font descriptor for the specified style and trait collection.

GetPreferredDescriptorForTextStyle(UIFontTextStyle, UITraitCollection)

Returns the preferred font descriptor for the specified style and trait collection.

GetPreferredDescriptorForTextStyle(NSString)

Weakly-typed version of an API used to retrieve the user's desired font size.

[Foundation.Export("preferredFontDescriptorWithTextStyle:")]
public static UIKit.UIFontDescriptor GetPreferredDescriptorForTextStyle (Foundation.NSString uiFontTextStyle);
static member GetPreferredDescriptorForTextStyle : Foundation.NSString -> UIKit.UIFontDescriptor

Parameters

uiFontTextStyle
NSString

Name of one of the built-in system text styles.

Returns

UIFontDescriptor

Attributes

Remarks

You can instead use the PreferredHeadline, PreferredBody, PreferredSubheadline, PreferredFootnote, PreferredCaption1 and PreferredCaption2 properties to get this information.

This can be used from a background thread.

Applies to

GetPreferredDescriptorForTextStyle(UIFontTextStyle)

Weakly-typed version of an API used to retrieve the user's desired font size.

public static UIKit.UIFontDescriptor GetPreferredDescriptorForTextStyle (UIKit.UIFontTextStyle uiFontTextStyle);
static member GetPreferredDescriptorForTextStyle : UIKit.UIFontTextStyle -> UIKit.UIFontDescriptor

Parameters

uiFontTextStyle
UIFontTextStyle

Name of one of the built-in system text styles.

Returns

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to

GetPreferredDescriptorForTextStyle(NSString, UITraitCollection)

Returns the preferred font descriptor for the specified style and trait collection.

[Foundation.Export("preferredFontDescriptorWithTextStyle:compatibleWithTraitCollection:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static UIKit.UIFontDescriptor GetPreferredDescriptorForTextStyle (Foundation.NSString uiFontTextStyle, UIKit.UITraitCollection traitCollection);
static member GetPreferredDescriptorForTextStyle : Foundation.NSString * UIKit.UITraitCollection -> UIKit.UIFontDescriptor

Parameters

uiFontTextStyle
NSString

Name of one of the built-in system text styles.

traitCollection
UITraitCollection

The trait collection for which to get the preferred font descriptor.

This parameter can be null.

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to

GetPreferredDescriptorForTextStyle(UIFontTextStyle, UITraitCollection)

Returns the preferred font descriptor for the specified style and trait collection.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static UIKit.UIFontDescriptor GetPreferredDescriptorForTextStyle (UIKit.UIFontTextStyle uiFontTextStyle, UIKit.UITraitCollection traitCollection);
static member GetPreferredDescriptorForTextStyle : UIKit.UIFontTextStyle * UIKit.UITraitCollection -> UIKit.UIFontDescriptor

Parameters

uiFontTextStyle
UIFontTextStyle

Name of one of the built-in system text styles.

traitCollection
UITraitCollection

The trait collection for which to get the preferred font descriptor.

This parameter can be null.

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to