Skip to main content

ComposerView

/// The composer view that layouts all the components to create a new message.

open class ComposerView: _View, ThemeProvider 

High level overview of the composer layout:

|---------------------------------------------------------|
| headerView |
|---------------------------------------------------------|--|
| leadingContainer | inputMessageView | trailingContainer | | = centerContainer
|---------------------------------------------------------|--|
| bottomContainer |
|---------------------------------------------------------|

Inheritance

_View, ThemeProvider

Properties

container

The main container of the composer that layouts all the other containers around the message input view.

public private(set) lazy var container = ContainerStackView()
.withoutAutoresizingMaskConstraints

headerView

The header view that displays components above the message input view.

public private(set) lazy var headerView = UIView()
.withoutAutoresizingMaskConstraints

bottomContainer

The container that displays the components below the message input view.

public private(set) lazy var bottomContainer = ContainerStackView()
.withoutAutoresizingMaskConstraints

centerContainer

The container that layouts the message input view and the leading/trailing containers around it.

public private(set) lazy var centerContainer = ContainerStackView()
.withoutAutoresizingMaskConstraints

leadingContainer

The container that displays the components in the leading side of the message input view.

public private(set) lazy var leadingContainer = ContainerStackView()
.withoutAutoresizingMaskConstraints

trailingContainer

The container that displays the components in the trailing side of the message input view.

public private(set) lazy var trailingContainer = ContainerStackView()
.withoutAutoresizingMaskConstraints

inputMessageView

A view to input content of the new message.

public private(set) lazy var inputMessageView: InputChatMessageView = components
.inputMessageView.init()
.withoutAutoresizingMaskConstraints

sendButton

A button to send the message.

public private(set) lazy var sendButton: UIButton = components
.sendButton.init()
.withoutAutoresizingMaskConstraints

confirmButton

A button to confirm when editing a message.

public private(set) lazy var confirmButton: UIButton = components
.confirmButton.init()
.withoutAutoresizingMaskConstraints

attachmentButton

A button to open the user attachments.

public private(set) lazy var attachmentButton: UIButton = components
.attachmentButton.init()
.withoutAutoresizingMaskConstraints

commandsButton

A button to open the available commands.

public private(set) lazy var commandsButton: UIButton = components
.commandsButton.init()
.withoutAutoresizingMaskConstraints

shrinkInputButton

A Button for shrinking the input view to allow more space for other actions.

public private(set) lazy var shrinkInputButton: UIButton = components
.shrinkInputButton.init()
.withoutAutoresizingMaskConstraints

dismissButton

A button to dismiss the current state (quoting, editing, etc..).

public private(set) lazy var dismissButton: UIButton = components
.closeButton.init()
.withoutAutoresizingMaskConstraints

titleLabel

A label part of the header view to display the current state (quoting, editing, etc..).

public private(set) lazy var titleLabel: UILabel = UILabel()
.withoutAutoresizingMaskConstraints
.withBidirectionalLanguagesSupport
.withAdjustingFontForContentSizeCategory

checkboxControl

A checkbox to check/uncheck if the message should also be sent to the channel while replying in a thread.

public private(set) lazy var checkboxControl: CheckboxControl = components
.checkmarkControl.init()
.withoutAutoresizingMaskConstraints

Methods

setUpAppearance()

override open func setUpAppearance() 

setUpLayout()

override open func setUpLayout() 

Did you find this page helpful?