Skip to main content

Poll Result

LMFeedPollResultScreen is a view controller responsible for displaying poll results. It provides a user interface with a horizontally scrollable list of poll options and a paginated view of user lists for each option.

LMFeedLikeListScreen

Protocols Implemented

  • UICollectionViewDataSource
  • UICollectionViewDelegateFlowLayout
  • UIPageViewControllerDataSource
  • UIPageViewControllerDelegate

UI Components

  • containerView: The main container view
  • optionView: Horizontally scrollable collection view for poll options
  • pageController: Page view controller for displaying user lists

Data Variables

  • optionList: List of poll options
  • userListVC: List of view controllers for user lists

Customisation

LMFeedPollResultScreen.swift
class CustomPollResultScreen: LMFeedPollResultScreen {
override func setupAppearance() {
super.setupAppearance()
view.backgroundColor = .lightGray
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
Components.shared.pollResultScreen = CustomPollResultScreen.self
// ...
return true
}