A template-based layout for custom messages.
SDK
- iOS 10.0+
Framework
- Messages
Declaration
class MSMessageTemplateLayout : MSMessage Layout
Overview
The MSMessage describes how an MSMessage object is presented in the transcript. The message template includes the Message extension’s icon, an image, video, or audio file, and a number of text elements (title, subtitle, caption, subcaption, trailing caption, and trailing subcaption). These elements are laid out as shown in Figure 1.
Message template layout

To use the template:
Instantiate a new
MSMessageobject.Template Layout Assign values to the properties representing the desired visual elements.
You can leave unwanted elements set to
nil. The system sizes the message balloon to fit the provided content.Assign the
MSMessageobject to theTemplate Layout MSMessageobject’slayoutproperty.
Do not subclass the MSMessage class.

