Skip to main content

Add Media View

Overview

LMFeedAddMediaView represents a custom view for adding media to a post creation screen. This view displays an image and a title label, along with an optional separator view.

LMFeedAddMediaView

UI Components

  • containerView: A container LMView that holds all other subviews.
  • imageView: An LMImageView that displays the provided image.
  • titleLabel: An LMLabel that displays the provided title text.
  • separatorView: An LMView that acts as a separator line at the bottom of the view.

Data Variables

  • imageHeight: A CGFloat value that determines the height of the imageView. The default value is 24.

Methods

  • configure(): Configures the view with the provided title text, image, and an option to hide the separator view.

Customization

CustomAddMediaView.swift
class CustomAddMediaView: LMFeedAddMediaView {
override func setupAppearance() {
super.setupAppearance()
containerView.backgroundColor = .green
titleLabel.textColor = .white
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMUIComponents.shared.addMediaView = CustomAddMediaView.self
// ...
return true
}