Poll Meta Options
Overview
LMFeedCreatePollMetaView is a customizable view designed to manage and display metadata options for a poll. It includes options for the poll metadata settings.

File Location:
LMFeedCreatePollMetaView.swift
Protocol
LMFeedCreatePollMetaViewProtocol
A protocol that defines the delegate methods for handling user interactions with metadata options.
onTapUserMetaOptions()- Called when user taps to change the option selection configonValueChanged(for id: Int)Called when user changes meta configuration of poll
UI Elements
containerView: A LMFeedView that holds all other subviewsmetaOptionStackView: A LMFeedStackView that contains metadata option widgetsoptionContainerView: A LMFeedView that holds the user option controlstitleLabel: A LMFeedLabel indicating the section for user voting optionsoptionTypeButton: A LMFeedButton to display and select the type of user optionmaxOptionButton: A LMFeedButton to display and select the maximum number of options a user can vote forequalSymbol: An LMFeedImageView showing an equal sign icon
Data Variables
delegate: A delegate conforming to the LMFeedCreatePollMetaViewProtocoluserOptions: An array to hold user options
Methods
configure(with data: ContentModel, delegate: LMFeedCreatePollMetaViewProtocol?): Configures the view with the provided content model and delegate
Customisation
CustomCreatePollMetaView.swift
class CustomCreatePollMetaView: LMFeedCreatePollMetaView {
override func setupAppearance() {
super.setupAppearance()
containerView.backgroundColor = .green
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.createPollMetaView = CustomCreatePollMetaView.self
// ...
return true
}