Skip to main content

Poll Result List Screen

Overview

The LMChatPollResultListScreen is a view controller that displays a list of users who voted for a specific poll option. It shows the list of voters in a table view and handles empty states.

Functionality

UI Components

  • voteView: An LMTableView that displays the list of voters.
  • indicatorView: A UIActivityIndicatorView for showing loading states.
  • noResultView: An LMChatNoResultView for displaying when there are no voters.

Customization

CustomPollResultListScreen
class CustomPollResultListScreen: LMChatPollResultListScreen {
override func setupAppearance() {
super.setupAppearance()
// Add custom appearance setup here
}

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
super.tableView(tableView, didSelectRowAt: indexPath)
// Add custom handling here
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.pollResultList = CustomPollResultListScreen.self
// ...
return true
}