Topic Selection
Overview
LMFeedTopicSelectionScreen provides a user interface for selecting topics. It displays a list of topics in a table view, with the ability to search and filter the topics.

File Location:
LMFeedTopicSelectionScreen.swift
Functionality
Protocols
LMFeedTopicSelectionViewProtocol
This protocol defines a method for updating the topic feed with the selected topics:
updateTopicFeed(with topics: [LMFeedTopicDataModel]): Called when the user selects topics and taps the "Done" button.
UI Components
topicSelectionListView: ALMTableViewinstance that displays the list of topics.- Registered Cells:
LMFeedTopicSelectionCell
- Registered Cells:
searchController: AUISearchControllerinstance for searching and filtering topics.
Data Variables
topicData: An array of arrays containing the topic data models for each section.searchTimer: ATimerinstance used for debouncing the search queries.delegate: A weak reference to an instance conforming toLMFeedTopicSelectionViewProtocolfor handling topic feed updates.
Action Handlers
didTapSelectButton(): The selector method for the "Done" button notifies the view model to handle the selected topics and send them back to the parent screen via a delegate.
Customization
CustomTopicSelectionScreen.swift
class CustomTopicSelectionScreen: LMFeedTopicSelectionScreen {
override func setupAppearance() {
super.setupAppearance()
tableView.backgroundColor = .lightGray
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
Components.shared.topicFeedSelectionScreen = CustomTopicSelectionScreen.self
// ...
return true
}