Reaction View Cell
Overview
The LMChatReactionViewCell
is used to display user reactions in a chat interface. It shows the user's profile picture, username, reaction emoji, and an optional "Tap To Remove" label for the user's own reactions.
File Location:
LMChatReactionViewCell.swift
UI Components
userImageView
: An LMImageView displaying the user's profile picture.userStackView
: An LMStackView that holds the username and remove label.userName
: An LMLabel showing the username.removeLabel
: An LMLabel with the text "Tap To Remove" for self reactions.reactionImage
: An LMLabel displaying the reaction emoji.
Methods
configure(with:)
: Initializes the cell with the providedContentModel
data.
Customization
CustomReactionViewCell
class CustomReactionViewCell: LMChatReactionViewCell {
override func setupAppearance() {
super.setupAppearance()
// Add custom styling here
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.reactionViewCell = CustomReactionViewCell.self
// ...
return true
}