Class
V2TIMElem
public class V2TIMElem
Definition of V2TIMElem
Relationships
Subclasses
V2TIMTextElemDefinition of V2TIMTextElem
V2TIMCustomElemDefinition of V2TIMCustomElem
V2TIMImageElemDefinition of V2TIMImageElem
V2TIMSoundElemDefinition of V2TIMSoundElem
V2TIMVideoElemDefinition of V2TIMVideoElem
V2TIMFileElemDefinition of V2TIMFileElem
V2TIMLocationElemDefinition of V2TIMLocationElem
V2TIMFaceElemDefinition of V2TIMFaceElem
V2TIMMergerElemDefinition of V2TIMMergerElem
V2TIMGroupTipsElemDefinition of V2TIMGroupTipsElem
Initializers
init()
public init()
Properties
description
public var description: String
Methods
getNextElem()
public func getNextElem() -> V2TIMElem?
Get the next Elem. If your message has multiple Elems, you can get the next Elem object from the current Elem. If the return value is nil, it means the Elem acquisition is over.
For detailed usage, please refer to the document Message sending and receiving
appendElem(element:)
public func appendElem(element: V2TIMElem)
Add the next element
To configure multiple elements, after creating a Message object, you can add the next element via the element object of Message. The following is the sample code for creating V2TIMTextElem and V2TIMCustomElem:
let msg = V2TIMManager.shared.createTextMessage(text: "text") let customElem = V2TIMCustomElem() customElem.data = "custom message".data(using: .utf8) msg.textElem?.appendElem(customElem: customElem)- Warning: Note that: * This API can be called only by elements of a Message object created via createMessage. * This API can be used to add V2TIMTextElem, V2TIMCustomElem, V2TIMFaceElem, or V2TIMLocationElem.
