Skip to main content

Members List Screen

Overview

The LMChatMemberListViewController display and manage a list of chat members. It extends the functionality of LMChatParticipantListViewController by focusing on Direct Message (DM) participants and providing additional member count information.

Functionality

Protocols Implemented

UI Components

  • memberCountsLabel: A LMLabel displaying the total number of members.
  • searchController: A UISearchController for member search functionality.
  • containerView: An instance of LMChatParticipantListView that displays the list of members.

Methods

  • setupSearchBar(): Configures the search bar in the navigation bar with specific settings for member list view.

Customization

CustomMemberListViewController.swift
class CustomMemberListViewController: LMChatMemberListViewController {
override func setupAppearance() {
super.setupAppearance()
memberCountsLabel.font = UIFont.boldSystemFont(ofSize: 14)
containerView.backgroundColor = .systemBackground
}

override func setupSearchBar() {
super.setupSearchBar()
searchController.searchBar.placeholder = "Search members..."
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.dmMemberListScreen = CustomMemberListViewController.self
// ...
return true
}