Type Method

fontDescriptorWithFontAttributes:

Returns a font descriptor with a dictionary of attributes.

Declaration

+ (UIFontDescriptor *)fontDescriptorWithFontAttributes:(NSDictionary<UIFontDescriptorAttributeName, id> *)attributes;

Parameters

attributes

The attributes for the font descriptor. If nil, the font descriptor’s dictionary will be empty.

Return Value

The new font descriptor.

See Also

Creating a Font Descriptor

preferredFontDescriptorWithTextStyle:

Returns a font descriptor containing the given text style and the user's selected content size category.

preferredFontDescriptorWithTextStyle:compatibleWithTraitCollection:

Returns a font descriptor containing the text style and the content size category specified by the provided trait collection.

fontDescriptorWithName:matrix:

Returns a font descriptor with the UIFontDescriptorNameAttribute and UIFontDescriptorMatrixAttribute dictionary attributes set to the given values.

fontDescriptorWithName:size:

Returns a font descriptor with the UIFontDescriptorNameAttribute and UIFontDescriptorSizeAttribute dictionary attributes set to the given values.

fontDescriptorByAddingAttributes:

Returns a new font descriptor that is the same as the receiver but with the specified attributes taking precedence over the existing ones.

fontDescriptorWithFace:

Returns a new font descriptor that is the same as the receiver but with the specified face.

fontDescriptorWithFamily:

Returns a new font descriptor whose attributes are the same as the receiver but from the specified family.

fontDescriptorWithMatrix:

Returns a new font descriptor that is the same as the receiver but with the specified matrix.

fontDescriptorWithSize:

Returns a new font descriptor that is the same as the receiver but with the specified point size.

fontDescriptorWithSymbolicTraits:

Returns a new font descriptor that is the same as the receiver but with the specified symbolic traits taking precedence over the existing ones.