Skip to main content

Report Screen

Overview

The LMChatReportViewController is used to display reporting functionality. It allows users to select a reason for reporting content and optionally provide additional details.

Functionality

UI Components

  • containerView: Main container view
  • containerScrollView: Scrollable container for the content
  • stackView: Vertical stack view for organizing UI elements
  • reportTitleLabel: Label displaying the main instruction
  • reportSubtitleLabel: Label providing additional context
  • collectionView: Collection view for displaying report reason tags
  • otherReasonTextView: Text view for custom report reasons
  • sepratorView: Separator line view
  • submitButton: Button to submit the report

Methods

  • didTapSubmitButton(): Handles the submit button tap
  • setupButton(isEnabled:): Updates the submit button state
  • updateTitle(): Updates the navigation title based on the report type
  • keyboardWillShow(_:): Adjusts scroll view insets when keyboard appears
  • keyboardWillHide(_:): Resets scroll view insets when keyboard disappears

Customization

CustomChatReportViewController.swift
class CustomChatReportViewController: LMChatReportViewController {
override func setupAppearance() {
super.setupAppearance()
// Add custom appearance setup here
}

override func didTapSubmitButton() {
super.didTapSubmitButton()
// Add custom handling for submit button tap
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.reportScreen = CustomChatReportViewController.self
// ...
return true
}