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.
Protocols Implemented
- UICollectionViewDataSource
- UICollectionViewDelegateFlowLayout
- UIPageViewControllerDataSource
- UIPageViewControllerDelegate
UI Components
containerView
: The main container viewoptionView
: Horizontally scrollable collection view for poll optionspageController
: Page view controller for displaying user lists
Data Variables
optionList
: List of poll optionsuserListVC
: 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
}