Class
AvailabilityBannerLayout
public final class AvailabilityBannerLayout: NSObject, ComponentLayout
Relationships
Conforms To
ComponentLayout
A protocol to share components (view layouts) across different types.
NSObject
Properties
headerText
public var headerText: String?
messageText
public var messageText: String?
textColor
public var textColor: UIColor = ColorManager.Primary.fiveHundred
Methods
layout(on:)
public func layout(on view: UIView)
update(header:text:)
public func update(header: String, text: String)
Updates the layout with header and message text.
update(text:)
public func update(text: String)
Updates the layout via one string. If the string contains a line break (\n), this will split on that first line break and update the layout.
Examples:
"This is the header\nThis is the text" will make a layout where the header will contain "This is the header", and the message will be "This is the text".
"This is some text" will make a layout where the header contains "This is some text" and will not show a message.