Search Message Cell
Overview
The LMChatSearchMessageCell
is used to display search results for messages. It shows the chatroom name, sender name, message content, date, and join status.
UI Components
titleLabel
: AnLMLabel
displaying the chatroom name.subtitleLabel
: AnLMLabel
showing the sender name and message content.dateLabel
: AnLMLabel
indicating the message date.isJoinedLabel
: AnLMLabel
showing if the chatroom is not joined.sepratorView
: AnLMView
used as a separator between cells.
Methods
configure(with:)
: Initializes the cell with the providedContentModel
data.
Customization
CustomSearchMessageCell
class CustomSearchMessageCell: LMChatSearchMessageCell {
override func setupAppearance() {
super.setupAppearance()
// Add custom styling here
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.searchMessageCell = CustomSearchMessageCell.self
// ...
return true
}