Contents

makeMessage(_:)

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

Declaration

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

Parameters

Return Value

The converted MainActorMessage or nil if conversion is not possible.

Discussion

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

See Also

Converting between messages and notifications