UIAction

public protocol UIAction : Action

The protocol to which most application Action(s) should conform.

Action implementations conforming to this protocol will automatically specify that they should only be dispatched in the main ActionSession and that all these actions must always be called on the main queue, so they do not need to check they are on the main queue or use async dispatch.

  • queue Extension method

    By default the dispatch queue that all actions are called on is main. They will be called synchronously if the caller is already on the same queue, and asynchronously only if the caller is not already on the same queue.

    See

    ActionSession.callerQueue because that determines which queue the action can be performed from, and the session will prevent calls from other queues. This does not have to be the same as the Action’s queue.

    Declaration

    Swift

    static var queue: DispatchQueue { get }
  • defaultSession Extension method

    Set the default session to main. You can override this in your conforming types if you want them to use a different namespace for logging and timelines.

    Declaration

    Swift

    static var defaultSession: ActionSession? { get }