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
: AnLMTableView
that displays the list of voters.indicatorView
: AUIActivityIndicatorView
for showing loading states.noResultView
: AnLMChatNoResultView
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
}