Example
When a user clicks on the user profile avatar at the post creator area, UIKit will open User profile page.

However, you can intercept the event and define your own logic following the example below.
Usage
To customize message cell layouts, please follow these instructions:
Create a subclass of
UITableViewCelland conform it toAmityMessageCellProtocolTo bind message data to UI, implement
display(message:). You can also implementheight(for message:boundingWidth:)to specify the cell height. We've included some examples below for static-height calculation and dynamic-height calculation as referenceSubclass
AmityEventHandler,and override its default functionschannelDidTap(from:channelId:)and conform toAmityMessageListDataSource.
4. Assign a class instance through a set function of AmityUIKitManager
Customizing Cells with Different Layouts
Static-Height Cell Layout
You can use static-height cell layout types for static content, where the cell height is fixed and will not be scaled regardless of the data being received.
Below is an example of how you can configure a static-height cell layout. In this example, we're assuming that the image message is a class named StaticHeightMessageCell.
Dynamic-Height Cell Layout
You can use dynamic-height cell layout when you require your cell height to expand dynamically according to the data (e.g. label expands upon strings).
Dynamic-height cell layouts require more complexity in height calculation. Let's look at a text message as an example, where the height of the cell needs to expand dynamically to display the full content.
Last updated
Was this helpful?