ASAPPButtonColors
@objc(ASAPPButtonColors)
@objcMembers
public class ASAPPButtonColors : NSObject
Used for configuring the styles of a button. For example, assign an instance to ASAPPColors.quickReplyButton
.
-
The color of the button’s background.
Declaration
Swift
public var backgroundNormal: UIColor
-
The color of the button’s background when tapped or otherwise highlighted. This property has been deprecated and will be removed in the next major version.
Declaration
Swift
@available(*, deprecated) public var backgroundHighlighted: UIColor
-
The color of the button’s background when disabled.
Declaration
Swift
public var backgroundDisabled: UIColor
-
The color of the button’s text.
Declaration
Swift
public var textNormal: UIColor
-
The color of the button’s text when tapped or otherwise highlighted.
Declaration
Swift
public var textHighlighted: UIColor
-
The color of the button’s text when disabled.
Declaration
Swift
public var textDisabled: UIColor
-
The color of the button’s border.
Declaration
Swift
public var border: UIColor?
-
init(backgroundNormal:
backgroundHighlighted: backgroundDisabled: textNormal: textHighlighted: textDisabled: border: ) Creates an instance of
ASAPPButtonColors
with the given properties.Declaration
Swift
public init(backgroundNormal: UIColor, backgroundHighlighted: UIColor, backgroundDisabled: UIColor, textNormal: UIColor, textHighlighted: UIColor, textDisabled: UIColor, border: UIColor?)
Parameters
backgroundNormal
The normal background color.
backgroundHighlighted
The highlighted background color.
backgroundDisabled
The disabled background color.
textNormal
The normal text color.
textHighlighted
The highlighted text color.
border
The border color. Optional.
-
Creates an instance of
ASAPPButtonColors
with the given background colors and textColor. Highlighted and disabled textColors are automatically generated.Declaration
Swift
public init(backgroundNormal: UIColor, backgroundHighlighted: UIColor, backgroundDisabled: UIColor, textColor: UIColor, border: UIColor?)
Parameters
backgroundNormal
The normal background color.
backgroundHighlighted
The highlighted background color.
backgroundDisabled
The disabled background color.
textColor
The normal text color.
border
The border color. Optional.
-
Creates an instance of
ASAPPButtonColors
with a text color. Highlighted and disabled text colors are automatically generated. Background colors are set toUIColor.clear
.Declaration
Swift
public init(textColor: UIColor)
Parameters
textColor
The normal text color.
-
Creates an instance of
ASAPPButtonColors
with a background and text color. A highlighted background color and a disabled text color are automatically generated.Declaration
Swift
public init(backgroundColor: UIColor, textColor: UIColor)
Parameters
backgroundColor
The background color.
textColor
The text color.
-
Creates an instance of
ASAPPButtonColors
with a background, text, and border color. A highlighted background and disabled text color are automatically generated.Declaration
Swift
public init(backgroundColor: UIColor, textColor: UIColor, border: UIColor?)
Parameters
backgroundColor
The background color.
textColor
The text color.
borderColor
The border color. Optional.