Skip to main content

Create Poll Date View

Overview

The LMChatCreatePollDateView displays the expiration date for a poll in a chat interface.

UI Components

  • containerView: An LMView that holds all other UI elements.
  • titleLabel: An LMLabel displaying the static text "Poll expires on".
  • dateLabel: An LMLabel showing the formatted expiration date and time.

Methods

  • configure(with date: Date): Updates the date label with a formatted date string.

Customization

CustomCreatePollDateView
class CustomCreatePollDateView: LMChatCreatePollDateView {
override func setupAppearance() {
super.setupAppearance()
// Add custom styling here
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.createPollDateView = CustomCreatePollDateView.self
// ...
return true
}