Document Attachment

Note : If Document Attachment feature unavailable for your plan then it will not display in MFUIActionSheetItem.

Initialize#

You can send the document attachment by clicking the attachment icon in the Chat screen of the user.

docAttachment

MFUIDocumentContentView is extension view class of MFUIBaseMediaContentView, which is used to display document table view cell. MFUIDocumentContentView consists of documentIcon, progressContentView and fileNameLabel

Property nameusage
documentIconUIImageView to show which type of document
fileNameLabelUILabel to describe the file name
progressContentViewMFUIProgressContentView class to display progress,cancel,retry and download

MFUIMessageStateView contains docSizeLabel which is an UILabel to show document size.

Document Cell Theme#

Custom theme Class MFMessageCellTheme subclass of MFUITheme is used to change the theme of document cell.

MFUIProgressContentView class theme can be customized with MFComponentTheme subclass of MFUITheme.

The following table shows a customizable property of MFMessageCellTheme to set font and colors in document cell.

property NameClassDescription
documentBackgroundColorMFMessageCellThemeThe backgound color of the document View.
documentNameFontMFMessageCellThemeThe text font of the document name.
documentNameColorMFMessageCellThemeThe text color of document name
documentSizeFontMFMessageCellThemeThe text font of document size Label
documentSizeColorMFMessageCellThemeThe text color of document size Label
progressBackgroundColorMFComponentThemeThe background color of progressView

Customize MFUIStringSet#

The following table shows a customizable property of MFUIStringSet that appears for document attachment. The MFUIStringSet is a set of strings used to compose a view. You need to modify the stringSet values in advance if you want to make changes to the view.

Property nameDescription
DocumentA text that refers to text of document in attachment bottom sheet

Customize MFUIIconSet#

The following table shows a customizable icon for document attachment.

Icon nameDescription
ic_pdfAn icon used to indicate pdf document.
ic_docAn icon used to indicate doc format.
ic_xlsAn icon used to indicate xls format.
ic_xlxsAn icon used to indicate xlxs format.
ic_pptAn icon used to indicate ppt format.
ic_pptxAn icon used to indicate pptx format.
ic_txtAn icon used to indicate txt format.
ic_rarAn icon used to indicate rar format.
ic_csvAn icon used to indicate csv format.
ic_docxAn icon used to indicate docx format.
documentAn icon used to indicate document
ic_uploadAn icon used to indicate upload icon in progressView
downloadAn icon used to indicate download icon in progressView
ic_closeAn icon used to indicate close icon in progressView