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.
File Location:
LMChatSearchMessageCell.swift
UI Components
titleLabel
: An LMLabel displaying the chatroom name.subtitleLabel
: An LMLabel showing the sender name and message content.dateLabel
: An LMLabel indicating the message date.isJoinedLabel
: An LMLabel showing if the chatroom is not joined.sepratorView
: An LMView 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
}