YMALabelAppearance

Objective-C

@interface YMALabelAppearance : NSObject <NSCopying, NSMutableCopying>

Swift

class YMALabelAppearance : NSObject, NSCopying, NSMutableCopying

A class with fixed settings for the standard text appearance: font name, size, and color. If you want to edit the standard appearance settings, use the YMAMutableLabelAppearance class.

  1. Properties
  2. font
  3. textColor
  4. Methods
  5. +appearanceWithFont:textColor:

Properties

font

Font settings: name and size.

Declaration

Objective-C

@property (nonatomic, strong, readonly) UIFont *_Nonnull font;

textColor

Text color.

Declaration

Objective-C

@property (nonatomic, strong, readonly) UIColor *_Nonnull textColor;

Methods

+appearanceWithFont:textColor:

Creates an object of the YMALabelAppearance class with the text settings.

Declaration

Objective-C

+ (nonnull instancetype)appearanceWithFont:(nonnull UIFont *)font
                                 textColor:(nonnull UIColor *)textColor;

Swift

convenience init(font: Any!, textColor: Any!)

Parameters

font

Font settings: name and size.

textColor

Text color.

font

Font settings: name and size.

textColor

Text color.

Return Value

The configured text appearance (the specified font and color).