CreationKit Documentation

Class Availability​Banner​Layout

public final class AvailabilityBannerLayout: NSObject, ComponentLayout  
AvailabilityBannerLayout AvailabilityBannerLayout NSObject NSObject AvailabilityBannerLayout->NSObject ComponentLayout ComponentLayout AvailabilityBannerLayout->ComponentLayout

Conforms To

ComponentLayout

A protocol to share components (view layouts) across different types.

NSObject

Properties

header​Text

public var headerText: String?  

message​Text

public var messageText: String?  

text​Color

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.