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
LMParticipantListViewDelegate
: Manages user interactions with the member list.UISearchResultsUpdating
: Handles search functionality for members.
UI Components
memberCountsLabel
: ALMLabel
displaying the total number of members.searchController
: AUISearchController
for member search functionality.containerView
: An instance ofLMChatParticipantListView
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
}