YMAButtonAppearance
Objective-C
@interface YMAButtonAppearance : NSObject <NSCopying, NSMutableCopying>
Swift
class YMAButtonAppearance : NSObject, NSCopying, NSMutableCopying
A class with fixed settings for the standard button appearance. If you want to edit the standard appearance settings, use the YMAMutableButtonAppearance
class.
- Properties
- textAppearance
- highlightedTextColor
- normalColor
- highlightedColor
- borderColor
- borderWidth
- Methods
- +appearanceWithTextAppearance:normalColor:highlightedColor:borderColor:borderWidth:
- +appearanceWithTextAppearance:highlightedTextColor:normalColor:highlightedColor:borderColor:borderWidth:
Settings for the button label (YMALabelAppearance
).
Declaration
Objective-C
@property (nonatomic, copy, readonly) YMALabelAppearance *_Nonnull textAppearance;
Swift
@NSCopying var textAppearance: YMALabelAppearance { get }
Label color when the button is clicked.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIColor *_Nonnull highlightedTextColor;
The color of the button background in its normal state.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIColor *_Nonnull normalColor;
The color of the button background when clicked.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIColor *_Nonnull highlightedColor;
The color of the button border.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIColor *_Nonnull borderColor;
Creates an object of the YMAButtonAppearance
class, that is, a button with the specified appearance (label font, label color, border color, and other settings).
Declaration
Objective-C
+ (nonnull instancetype)
appearanceWithTextAppearance:(nonnull YMALabelAppearance *)textAppearance
normalColor:(nonnull UIColor *)normalColor
highlightedColor:(nonnull UIColor *)highlightedColor
borderColor:(nonnull UIColor *)borderColor
borderWidth:(CGFloat)borderWidth;
Swift
convenience init(textAppearance: YMALabelAppearance, normalColor: Any!, highlightedColor: Any!, borderColor: Any!, borderWidth: CGFloat)
Parameters
textAppearance | Settings for the button label ( |
normalColor | The color of the button background in its normal state. |
highlightedColor | The color of the button background when clicked. |
borderColor | The color of the button border. |
borderWidth | The width of the button border. |
textAppearance | Settings for the button label ( |
normalColor | The color of the button background in its normal state. |
highlightedColor | The color of the button background when clicked. |
borderColor | The color of the button border. |
borderWidth | The width of the button border. |
Return Value
Configured button appearance.
+appearanceWithTextAppearance:highlightedTextColor:normalColor:highlightedColor:borderColor:borderWidth:
Creates an object of the YMAButtonAppearance
class, that is, a button with the specified appearance (label font, label color, border color, and other settings).
Declaration
Objective-C
+ (nonnull instancetype)
appearanceWithTextAppearance:(nonnull YMALabelAppearance *)textAppearance
highlightedTextColor:(nonnull UIColor *)highlightedTextColor
normalColor:(nonnull UIColor *)normalColor
highlightedColor:(nonnull UIColor *)highlightedColor
borderColor:(nonnull UIColor *)borderColor
borderWidth:(CGFloat)borderWidth;
Swift
convenience init(textAppearance: YMALabelAppearance, highlightedTextColor: Any!, normalColor: Any!, highlightedColor: Any!, borderColor: Any!, borderWidth: CGFloat)
Parameters
textAppearance | Settings for the button label ( |
highlightedTextColor | Label color when the button is clicked. |
normalColor | The color of the button background in its normal state. |
highlightedColor | The color of the button background when clicked. |
borderColor | The color of the button border. |
borderWidth | The width of the button border. |
textAppearance | Settings for the button label ( |
highlightedTextColor | Label color when the button is clicked. |
normalColor | The color of the button background in its normal state. |
highlightedColor | The color of the button background when clicked. |
borderColor | The color of the button border. |
borderWidth | The width of the button border. |
Return Value
Configured button appearance.