Skip to main content

Member Item

Overview

LMFeedMemberItem is used to display user information associated for a post/comment/reply. It showcases the user's profile image and name, along with an optional custom title.

LMFeedNotificationView

UI Components

  • userImage: An LMImageView that displays the user's profile image.
  • userTitleLabel: An LMLabel that displays user's name.

Data Variables

  • touchCallback: Callback to handle tap events.

Methods

  • configure(): Configures the cell with the provided data and sets up the callback for cell interactions.

  • setUsername(): Generates an attributed string for the user's name and optional custom title. This method allows for customized styling of the text displayed in the userTitleLabel.

Action Handlers

  • didTapView(): The selector method called when the container view is tapped.

Customisation

CustomMemberItem.swift
class CustomMemberItem: LMFeedMemberItem {
override func setupAppearance() {
super.setupAppearance()
backgroundColor = .green
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.likeUserItem = CustomMemberItem.self
// ...
return true
}