Skip to main content

Topic View Cell

LMFeedTopicViewCell is a collection cell used to display single topic name with a post widget.

LMFeedTopicViewCell

UI Components

  • textLabel: An instance of LMLabel used to display the topic title.

Data Variables

  • data: An instance of LMFeedTopicCollectionCellDataModel, which contains the data necessary to configure the cell, primarily the topic title.

Methods

  • configure(): Configures the cell with specific data, setting the textLabel to display the topic title.

Customisation

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