Skip to main content

Edit Post

Overview

LMFeedEditPostScreen is a comprehensive screen that allows users to edit posts by editing text.

Protocols Implemented

UI Components

  • scrollView: A scroll view that contains a vertical stack view for laying out the UI components.
  • headerView: A view displaying the user's profile information.
  • topicView: A view for displaying and selecting topics related to the post.
  • inputTextView: A text view for entering the post content, with support for tagging users.
  • linkPreview: A view for displaying a preview of a link shared in the post content.
  • mediaCollectionView: A collection view for displaying previews of attached media (images and videos).
  • mediaPageControl: A page control indicating the current page of the media collection view.
  • documentTableView: A table view for displaying previews of attached documents.
  • videoPlayer: An AVPlayerViewController for playing videos.
  • taggingView: A view for displaying a list of users to be tagged in the post content.

Action Handlers

  • didTapSaveButton(): Called when the "Save" button is tapped, updating the post with the current text content.

Customisation

CustomLikeViewController.swift
class CustomEditPostScreen: LMFeedEditPostScreen {
override func setupAppearance() {
super.setupAppearance()
view.backgroundColor = .lightGray
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
Components.shared.editPostScreen = CustomEditPostScreen.self
// ...
return true
}