UIKit provides default renderers for the core data types: text
, image
, and file
. It also provides a way to render your own UI for your custom post.
A single post UI is composed of 1 or more UITableViewCell. This allows reusability of cell components such as header or footer which can be shared by different kinds of posts.
This is an example of simple text post which contains 3 tableview cell. Top cell represents the header, middle cell contains text content and bottom cell is footer cell.
There are 3 steps involved in creating custom post renderer.
Step 1: Create your UI using UITableView cells.
Step 2: Compose a post UI component. For this create a component which conforms to AmityPostComposable
protocol.
You can also use our default header cell AmityPostHeaderTableViewCell
& default footer cell AmityPostFooterTableViewCell
in your custom post component.
Step 3: Register your custom cell & implement datasource.