Base Components | Description |
---|---|
MessageInput | This provides a basic layout for the contents of this component, such as the TextField and buttons |
ActionSheet | The ActionSheet component presents a list of options in either a list or grid mode, depending on the user’s preference |
OnSendButtonClick
event gets activated when the send message button is clicked. The following code snippet Overrides the action of the send button in CometChatMessageComposer.
Component
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
The MessageComposer Component does not emit any events of its own.
MessageComposerStyle
to the MessageComposer component.
Property | Description | Method |
---|---|---|
Set BorderWidth | Sets the border width for message composer | .set(borderWidth: CGFloat) |
Set BorderColor | Sets the border color for message composer | .set(borderColor: UIColor) |
Set CornerRadius | Sets the corner radius for message composer | .set(cornerRadius: CometChatCornerStyle) |
Set Background | Sets the background color for message composer | .set(background: UIColor) |
Set InputBackgroundColor | Sets the input background color of message composer | .set(inputBackground: UIColor) |
Set TextFont | Sets the input text font of message composer | .set(textFont: UIFont) |
Set InputBoxPlaceholderFont | Sets the placeholder text font for message composer input field | .set(inputBoxPlaceholderFont: UIFont) |
Set PlaceHolderTextColor | Sets the placeholder text color for message composer input field | .set(placeHolderTextColor: UIColor) |
Set AttachIconTint | Sets the attachment icon tint color | .set(attachmentIconTint: UIColor) |
Set SendIconTint | Sets send button icon tint color | .set(sendIconTint: UIColor) |
Set SeparatorTint | Sets the separator color for message composer | .set(separatorTint: UIColor) |
Set InputBorderWidth | Sets the border width for message composer input view | .set(inputBorderWidth: CGFloat) |
Set InputBorderColor | Sets the border color for message composer input view | .set(inputBorderColor: UIColor) |
Set ActionSheetTitleColor | Sets the title color for action sheet of message composer | .set(actionSheetTitleColor: UIColor) |
Set ActionSheetTitleFont | Sets the title font for action sheet of message composer | .set(actionSheetTitleFont: UIFont) |
Set ActionSheetLayoutModelIconTint | Sets action sheet layout mode icon tint color for message composer | .set(actionSheetLayoutModelIconTint: UIColor) |
Set ActionSheetCancelButtonIconTint | Sets action sheet cancel button icon tint color for message composer | .set(actionSheetCancelButtonIconTint: UIColor) |
Set ActionSheetCancelButtonIconFont | Sets the action sheet cancel button icon font color for message composer | .set(actionSheetCancelButtonIconFont: UIFont) |
Set ActionSheetSeparatorTint | Sets the separator color for action sheet items | .set(actionSheetSeparatorTint: UIColor) |
Set ActionSheetBackground | Sets the background color of action sheet | .set(actionSheetBackground: UIColor) |
Set VoiceRecordingIconTint | Sets the voice recorder icon tint color | .set(voiceRecordingIconTint: UIColor) |
Set AiIconTint | Sets the ai icon tint color | .set(aiIconTint: UIColor) |
Set InfoTextColor | Sets the text color for info message displayed | .set(infoTextColor: UIColor) |
Set InfoIconTintColor | Sets the tint color for info icon | .set(infoIconTintColor: UIColor) |
Set InfoBackgroundColor | Sets the background color for info message view | .set(infoBackgroundColor: UIColor) |
Set InfoSeparatorColor | Sets the separator color for info view | .set(infoSeparatorColor: UIColor) |
.set(mediaRecorderStyle:)
method. For more details, please refer to MediaRecorder styles.
Property | Description | Code |
---|---|---|
Set PlayIconTint | Sets play voice button tint color | .set(playIconTint: UIColor) |
Set StopIconTint | Sets stop voice button tint color | .set(stopIconTint: UIColor) |
Set PauseIconTint | Sets pause voice button tint color | .set(pauseIconTint: UIColor) |
Set SubmitIconTint | Sets submit voice button tint color | .set(submitIconTint: UIColor) |
Set TimerTextColor | Sets text color for voice record timer | .set(timerTextColor: UIColor) |
Set TimerTextFont | Sets text font for voice record timer | .set(timerTextFont: UIFont) |
Set DeleteIconTint | Sets delete voice button tint color | .set(deleteIconTint: UIColor) |
.set(aiOptionsStyle:)
method. For more details, please refer to MediaRecorder styles.
Property | Description | Code |
---|---|---|
Set AIIconTint | Sets ai button tint color | .set(aiIconTint: UIColor) |
Set ButtonBorder | Sets border for ai options button | .set(buttonBorder: CGFloat) |
Set ButtonBackground | Sets background color for ai options button | .set(buttonBackground: UIColor) |
Set ButtonTextFont | Sets ai options button text font | .set(buttonTextFont: UIColor) |
Set ButtonTextColor | Sets ai options button text color | .set(buttonTextColor: UIColor) |
Set ButtonBorderColor | Sets border color for ai options button | .set(buttonBorderColor: UIColor) |
Set ButtonBorderRadius | Sets border radius for ai options button | .set(buttonBorderRadius: CGFloat) |
Set CancelBackground | Sets cancel button background color | .set(cancelBackground: UIColor) |
Set CancelButtonFont | Sets cancel button text font | .set(cancelButtonFont: UIFont) |
Set CancelButtonColor | Sets cancel button text color | .set(cancelButtonColor: UIColor) |
Set CancelButtonBorder | Sets border for cancel button | .set(cancelButtonBorder: CGFloat) |
Set CancelButtonBorderColor | Sets cancel button border color | .set(cancelButtonBorderColor: UIColor) |
Set CancelButtonBorderRadius | Sets border radius for cancel button | .set(cancelButtonBorderRadius: CGFloat) |
Set Background | Sets background color for ai options action sheet | .set(background: UIColor) |
Set BorderWidth | Sets border width for ai options action sheet | .set(borderWidth: CGFloat) |
Set BorderColor | Sets border color for ai options action sheet | .set(borderColor: UIColor) |
Set CornerRadius | Sets corner radius for ai options action sheet | .set(background: CGFloat) |
Property | Description | Code |
---|---|---|
User | Used to pass user object of which header specific details will be shown | .set(user: User) |
Group | Used to pass group object of which header specific details will be shown | .set(group: Group) |
Set Background | Sets background color for message composer | .set(background: UIColor) |
Set PlaceHolderText | Sets message composer’s placeholder text | .set(placeholderText: String) |
Set MaxLine | Sets limit for lines of text to be displayed in input field | .set(maxLines: Int) |
Set AuxiliaryButtonAlignment | Sets position for auxiliary buttons view , can be left or right . default is right | .set(auxiliaryButtonAlignment: AuxiliaryButtonAlignment) |
Set CustomSoundForMessages | Sets custom sounds for outgoing messages. | .set(customSoundForMessage: URL) |
Set LiveReactionIcon | Sets custom live reaction icon. | .set(LiveReactionIconURL: UIImage) |
Set Parent MessageId | Sets the parentMessageId used in the CometChatMessageComposer for all sub-components. It is used to send messages to the particular thread. | .set(parentMessageId: Int) |
Set DisableMentions | Enables/Disables user mentions in message composer input field. | .set(disableMentions: Bool) |
Set InfoIcon | Sets image for info icon. | .set(infoIcon: UIImage) |
Set AttachmentIcon | Sets image for attachment button on message composer. | .set(attachmentIcon: UIImage) |
Set AIAuxiliaryIcon | Sets image for ai auxillary button. | .set(aiAuxiliaryIcon: UIImage) |
Set OnSendButtonClick | Sets custom actions for send button click. | .setOnSendButtonClick() |
Hide LiveReaction | Toggles visibility for live reaction component | .hide(liveReaction: Bool) |
Hide FooterView | Toggles visibility for footer view of message composer | .hide(footerView: Bool) |
Hide HeaderView | Toggles visibility for header view of message composer | .hide(headerView: Bool) |
Hide SendButton | Toggles visibility for send button | .hide(sendButton: Bool) |
Hide VoiceRecording | Toggles visibility for voice recorder button | .hide(voiceRecording: Bool) |
Disable TypingEvents | Used to disable/enable typing events , default value is false | .disable(disableTypingEvents: Bool) |
Disable SoundForMessages | Toggles sound for outgoing messages | .disable(disableSoundForMessages: Bool) |
setAttachmentOptions()
, you can set a list of custom MessageComposerActions
for the MessageComposer Component. This will override the existing list of MessageComposerActions
.
.setAuxiliaryButtonView()
function.
.setSecondaryButtonView()
function.
.set(headerView: UIView?)
method.
cometChatMessages
. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller..set(footerView: UIView?)
method.
cometChatMessages
. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.