Contents

makeMessage(_:)

Converts a posted notification into this asynchronous message type for any observers.

Declaration

static func makeMessage(_ notification: Notification) -> Self?

Parameters

Return Value

The converted AsyncMessage, or nil if conversion is not possible.

Discussion

To implement this method in your own AsyncMessage conformance, retrieve values from the Notification’s userInfo and set them as properties on the message.

See Also

Converting between messages and notifications