Loading...
UIKit allows all types of message bubble to be replaced.
To customize message UI, create a new UITableViewCell and conform to AmityMessageCellProtocol.
UITableViewCell
import UIKit import AmityUIKit class CustomTableViewCell: UITableViewCell, AmityMessageCellProtocol { func display(message: AmityMessageModel) { // Do stuff } }
import UIKit import AmityUIKit class ClientViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } @IBAction func showChatPage(_ sender: UIButton) { let chatVC = AmityChatHomePageViewController.make() chatVC.messageDataSource = self present(recentChatVC, animated: true) } } extension ClientViewController: AmityMessageListDataSource { func cellForMessageTypes() -> [AmityMessageTypes: AmityMessageCellProtocol.Type] { return [.textIncoming: CustomTableViewCell.self] } }