Topic View Cell
LMFeedTopicViewCell
is a collection cell used to display single topic name with a post widget.
UI Components
textLabel
: An instance ofLMLabel
used to display the topic title.
Data Variables
data
: An instance ofLMFeedTopicCollectionCellDataModel
, which contains the data necessary to configure the cell, primarily the topic title.
Methods
configure()
: Configures the cell with specific data, setting thetextLabel
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
}