Skip to main content

Poll Date View

Overview

LMFeedCreatePollDateView is a customizable view designed to display and manage the expiration date of a poll.

LMFeedCreatePollDateView

UI Elements

  • containerView: A container view that holds the title and date labels.
  • titleLabel: A label indicating the section for the poll expiration date.
  • dateLabel: A label displaying the formatted expiration date.

Methods

  • configure(with date: Date): Configures the view with the provided date.

Customisation

CustomCreatePollDateView.swift
class CustomCreatePollDateView: LMFeedCreatePollDateView {
override func setupAppearance() {
super.setupAppearance()

containerView.backgroundColor = .green
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.createPollDateView = CustomCreatePollDateView.self
// ...
return true
}