Skip to main content

Select Topic View

Overview

LMFeedSelectTopicViewCell is a subclass of LMCollectionViewCell designed to display a "Select Topics" button within a collection view. This cell is typically used in a feed or post creation flow to allow users to select topics or categories for their posts.

LMFeedSelectTopicViewCell

UI Components

  • selectTopicIcon: An LMButton that displays the text "Select Topics" along with a plus icon. This button is used to initiate the topic selection process.

Data Variables

  • selectCallback: A closure that will be executed when the user taps on the "Select Topics" button.

Methods

  • configure(): Configures the cell with a closure that will be executed when the "Select Topics" button is tapped.

Action Handlers

  • didTapSelectTopics(): The selector method called when the user taps on the "Select Topics" button. It executes the selectCallback closure, if set.

Customisation

CustomSelectTopicView.swift
class CustomSelectTopicView: LMFeedCommentView {
override func setupAppearance() {
super.setupAppearance()
backgroundColor = .green
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.topicSelectIconView = CustomSelectTopicView.self
// ...
return true
}