Custom Cell
Overview
LMFeedPostWidgetCell
is a subclass of LMPostWidgetTableViewCell designed to display posts with Custom Widget attachments in a post.
Data Variables
data
: Optionally stores theLMFeedPostContentModel
of the post associated with the cell.indexPath
: Optionally stores theIndexPath
of the cell within the tableView, useful for delegate callbacks.
Methods
configure()
: Configures the cell with the data and sets the delegate.
Customisation
CustomWidgetCell.swift
class CustomWidgetCell: LMFeedPostCustomCell {
// Your Custom Implementation
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.customCell = CustomWidgetCell.self
// ...
return true
}
note
For more information on how to render custom widgets in a post, refer to the How to Render Custom Widget in a Post guide.