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.
UI Components
userImageView
: AnLMImageView
displaying the user's profile picture.userStackView
: AnLMStackView
that holds the username and remove label.userName
: AnLMLabel
showing the username.removeLabel
: AnLMLabel
with the text "Tap To Remove" for self reactions.reactionImage
: AnLMLabel
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
}