Contents

insert(_:completionHandler:)

Inserts a sticker into the current context.

Declaration

func insert(_ sticker: MSSticker, completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)
func insert(_ sticker: MSSticker) async throws

Parameters

  • sticker:

    The sticker to be inserted.

  • completionHandler:

    A block that is called as soon as the insertion is complete. This block is passed the following parameter:

    error

    An error object. If an error occurred, this object contains information about the error; otherwise, it is set to nil.

Mentioned in

Discussion

Use this method to insert a sticker into the current context.

This method operates asynchronously. Although the method returns immediately, the actual work is deferred and performed in the background. As soon as the attachment is inserted, the system calls the completion block on a background queue.

See Also

Inserting Content into the Input Field